mirror of
https://github.com/1f349/lavender.git
synced 2025-04-15 15:27:55 +01:00
46 lines
924 B
Go
46 lines
924 B
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.28.0
|
|
// source: manage-oauth-source.sql
|
|
|
|
package database
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
const getOAuthSources = `-- name: GetOAuthSources :many
|
|
SELECT namespace, address, registration, button, client_id, client_secret, client_scopes FROM oauth_sources
|
|
`
|
|
|
|
func (q *Queries) GetOAuthSources(ctx context.Context) ([]OauthSource, error) {
|
|
rows, err := q.db.QueryContext(ctx, getOAuthSources)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
defer rows.Close()
|
|
var items []OauthSource
|
|
for rows.Next() {
|
|
var i OauthSource
|
|
if err := rows.Scan(
|
|
&i.Namespace,
|
|
&i.Address,
|
|
&i.Registration,
|
|
&i.Button,
|
|
&i.ClientID,
|
|
&i.ClientSecret,
|
|
&i.ClientScopes,
|
|
); err != nil {
|
|
return nil, err
|
|
}
|
|
items = append(items, i)
|
|
}
|
|
if err := rows.Close(); err != nil {
|
|
return nil, err
|
|
}
|
|
if err := rows.Err(); err != nil {
|
|
return nil, err
|
|
}
|
|
return items, nil
|
|
}
|