Versions in this module Expand all Collapse all v0 v0.0.1 Apr 2, 2024 Changes in this version + type AuthorizationCode struct + Browser sql.NullString + ClientID string + ExpiresAt sql.NullTime + ID string + Os sql.NullString + Scopes string + UserID string + type AuthorizationHistory struct + AuthorizedAt time.Time + ClientID string + UserID string + type Client struct + AuthCallbackUrls string + BackchannelLogoutUrl sql.NullString + CreatedAt time.Time + ID string + LogoutCallbackUrls string + Name string + PictureUrl sql.NullString + SecretHash string + TokenExpiration int64 + type CreateAuthzCodeParams struct + Browser sql.NullString + ClientID string + ExpiresAt sql.NullTime + ID string + Os sql.NullString + Scopes string + UserID string + type CreateAuthzHistoryParams struct + ClientID string + UserID string + type CreateClientParams struct + AuthCallbackUrls string + BackchannelLogoutUrl sql.NullString + ID string + LogoutCallbackUrls string + Name string + PictureUrl sql.NullString + SecretHash string + TokenExpiration int64 + type CreateSessionParams struct + Browser sql.NullString + ClientID sql.NullString + ExpiresAt time.Time + ID string + Os sql.NullString + UserID string + type CreateUserParams struct + AvatarUrl sql.NullString + Email string + HashedPassword sql.NullString + ID string + type DBTX interface + ExecContext func(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext func(context.Context, string) (*sql.Stmt, error) + QueryContext func(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext func(context.Context, string, ...interface{}) *sql.Row + type GetAuthzHistoryParams struct + ClientID string + UserID string + type GetClientByNameForUnmatchingIDParams struct + ID string + Name string + type GetSessionWithClientForUserIDRow struct + Browser sql.NullString + ClientName sql.NullString + CreatedAt time.Time + ExpiresAt time.Time + ID string + Os sql.NullString + type GetSessionWithClientRow struct + BackchannelLogoutUrl sql.NullString + ClientID string + ClientName string + ID string + LogoutCallbackUrls string + type GetSessionWithOptionalClientRow struct + BackchannelLogoutUrl sql.NullString + ClientID sql.NullString + ClientName sql.NullString + ID string + LogoutCallbackUrls sql.NullString + type GetSessionWithUserRow struct + AvatarUrl sql.NullString + Email string + ExpiresAt time.Time + ID string + IsAdmin bool + UserID string + type GetUserAndClientCountRow struct + ClientCount int64 + UserCount int64 + type Queries struct + func New(db DBTX) *Queries + func (q *Queries) CreateAuthzCode(ctx context.Context, arg CreateAuthzCodeParams) (sql.Result, error) + func (q *Queries) CreateAuthzHistory(ctx context.Context, arg CreateAuthzHistoryParams) (sql.Result, error) + func (q *Queries) CreateClient(ctx context.Context, arg CreateClientParams) (sql.Result, error) + func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (sql.Result, error) + func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (sql.Result, error) + func (q *Queries) DeleteAuthzCode(ctx context.Context, id string) error + func (q *Queries) DeleteClient(ctx context.Context, id string) error + func (q *Queries) DeleteExpiredAuthzCode(ctx context.Context) error + func (q *Queries) DeleteExpiredSessions(ctx context.Context) error + func (q *Queries) DeleteSession(ctx context.Context, id string) error + func (q *Queries) GetAuthzCode(ctx context.Context, id string) (AuthorizationCode, error) + func (q *Queries) GetAuthzHistory(ctx context.Context, arg GetAuthzHistoryParams) (AuthorizationHistory, error) + func (q *Queries) GetClient(ctx context.Context, id string) (Client, error) + func (q *Queries) GetClientByName(ctx context.Context, name string) (Client, error) + func (q *Queries) GetClientByNameForUnmatchingID(ctx context.Context, arg GetClientByNameForUnmatchingIDParams) (Client, error) + func (q *Queries) GetClients(ctx context.Context) ([]Client, error) + func (q *Queries) GetSession(ctx context.Context, id string) (Session, error) + func (q *Queries) GetSessionWithClient(ctx context.Context, id string) (GetSessionWithClientRow, error) + func (q *Queries) GetSessionWithClientForUserID(ctx context.Context, userID string) ([]GetSessionWithClientForUserIDRow, error) + func (q *Queries) GetSessionWithOptionalClient(ctx context.Context, id string) (GetSessionWithOptionalClientRow, error) + func (q *Queries) GetSessionWithUser(ctx context.Context, id string) (GetSessionWithUserRow, error) + func (q *Queries) GetUser(ctx context.Context, id string) (User, error) + func (q *Queries) GetUserAndClientCount(ctx context.Context) (GetUserAndClientCountRow, error) + func (q *Queries) GetUserByEmail(ctx context.Context, email string) (User, error) + func (q *Queries) GetUsers(ctx context.Context) ([]User, error) + func (q *Queries) UpdateClient(ctx context.Context, arg UpdateClientParams) error + func (q *Queries) UpdateUserAvatar(ctx context.Context, arg UpdateUserAvatarParams) error + func (q *Queries) UpdateUserPasswordHash(ctx context.Context, arg UpdateUserPasswordHashParams) error + func (q *Queries) WithTx(tx *sql.Tx) *Queries + type Session struct + Browser sql.NullString + ClientID sql.NullString + CreatedAt time.Time + ExpiresAt time.Time + ID string + Os sql.NullString + UserID string + type UpdateClientParams struct + AuthCallbackUrls string + BackchannelLogoutUrl sql.NullString + ID string + LogoutCallbackUrls string + Name string + PictureUrl sql.NullString + TokenExpiration int64 + type UpdateUserAvatarParams struct + AvatarUrl sql.NullString + ID string + type UpdateUserPasswordHashParams struct + HashedPassword sql.NullString + ID string + type User struct + AvatarUrl sql.NullString + CreatedAt time.Time + Email string + HashedPassword sql.NullString + ID string + IsAdmin bool