query

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRequest

type AuthRequest struct {
	ID                  string
	ApplicationID       string
	RedirectUri         string
	State               string
	Prompt              string
	LoginHint           string
	MaxAuthAgeSeconds   int64
	UserID              string
	Scopes              string
	ResponseType        string
	ResponseMode        string
	Nonce               string
	CodeChallenge       string
	CodeChallengeMethod string
	Complete            bool
	CreatedAt           int64
	AuthenticatedAt     int64
	AuthCode            sql.NullString
}

func (*AuthRequest) Done

func (a *AuthRequest) Done() bool

func (*AuthRequest) GetACR

func (a *AuthRequest) GetACR() string

func (*AuthRequest) GetAMR

func (a *AuthRequest) GetAMR() []string

func (*AuthRequest) GetAudience

func (a *AuthRequest) GetAudience() []string

func (*AuthRequest) GetAuthTime

func (a *AuthRequest) GetAuthTime() time.Time

func (*AuthRequest) GetClientID

func (a *AuthRequest) GetClientID() string

func (*AuthRequest) GetCodeChallenge

func (a *AuthRequest) GetCodeChallenge() *oidc.CodeChallenge

func (*AuthRequest) GetID

func (a *AuthRequest) GetID() string

func (*AuthRequest) GetNonce

func (a *AuthRequest) GetNonce() string

func (*AuthRequest) GetRedirectURI

func (a *AuthRequest) GetRedirectURI() string

func (*AuthRequest) GetResponseMode

func (a *AuthRequest) GetResponseMode() oidc.ResponseMode

func (*AuthRequest) GetResponseType

func (a *AuthRequest) GetResponseType() oidc.ResponseType

func (*AuthRequest) GetScopes

func (a *AuthRequest) GetScopes() []string

func (*AuthRequest) GetState

func (a *AuthRequest) GetState() string

func (*AuthRequest) GetSubject

func (a *AuthRequest) GetSubject() string

type CreateAuthRequestParams

type CreateAuthRequestParams struct {
	ID                  string
	ApplicationID       string
	RedirectUri         string
	State               string
	Prompt              string
	LoginHint           string
	MaxAuthAgeSeconds   int64
	UserID              string
	Scopes              string
	ResponseType        string
	ResponseMode        string
	CodeChallenge       string
	CodeChallengeMethod string
	Nonce               string
	Complete            bool
	CreatedAt           int64
	AuthenticatedAt     int64
}

type CreateKeyParams

type CreateKeyParams struct {
	ID         string
	Alg        string
	Usage      string
	PublicKey  string
	PrivateKey string
	CreatedAt  int64
}

type CreateRefreshTokenParams added in v0.1.2

type CreateRefreshTokenParams struct {
	ID            string
	AuthTime      int64
	Amr           sql.NullString
	Audience      string
	Subject       string
	ApplicationID string
	Expiration    int64
	Scopes        string
	CreatedAt     int64
}

type CreateTokenParams

type CreateTokenParams struct {
	ID             string
	AuthRequestID  sql.NullString
	ApplicationID  string
	RefreshTokenID sql.NullString
	Subject        string
	Audience       string
	Expiration     int64
	Scopes         string
	CreatedAt      int64
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type Key

type Key struct {
	ID         string
	Alg        string
	Usage      string
	PublicKey  string
	PrivateKey string
	CreatedAt  int64
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) CreateAuthRequest

func (q *Queries) CreateAuthRequest(ctx context.Context, arg CreateAuthRequestParams) (*AuthRequest, error)

func (*Queries) CreateKey

func (q *Queries) CreateKey(ctx context.Context, arg CreateKeyParams) (*Key, error)

func (*Queries) CreateRefreshToken added in v0.1.2

func (q *Queries) CreateRefreshToken(ctx context.Context, arg CreateRefreshTokenParams) (*RefreshToken, error)

func (*Queries) CreateToken

func (q *Queries) CreateToken(ctx context.Context, arg CreateTokenParams) (*Token, error)

func (*Queries) DeleteAllAuthRequests

func (q *Queries) DeleteAllAuthRequests(ctx context.Context) error

func (*Queries) DeleteAllKeys

func (q *Queries) DeleteAllKeys(ctx context.Context) error

func (*Queries) DeleteAllTokens

func (q *Queries) DeleteAllTokens(ctx context.Context) error

func (*Queries) GetAllKeys

func (q *Queries) GetAllKeys(ctx context.Context) ([]*Key, error)

func (*Queries) GetAuthRequestByAuthCode

func (q *Queries) GetAuthRequestByAuthCode(ctx context.Context, authCode sql.NullString) (*AuthRequest, error)

func (*Queries) GetAuthRequestByID

func (q *Queries) GetAuthRequestByID(ctx context.Context, id string) (*AuthRequest, error)

func (*Queries) GetKeyByID

func (q *Queries) GetKeyByID(ctx context.Context, id string) (*Key, error)

func (*Queries) GetKeysByUse

func (q *Queries) GetKeysByUse(ctx context.Context, usage string) ([]*Key, error)

func (*Queries) GetRefreshTokenByID added in v0.1.2

func (q *Queries) GetRefreshTokenByID(ctx context.Context, id string) (*RefreshToken, error)

func (*Queries) GetTokenByID

func (q *Queries) GetTokenByID(ctx context.Context, id string) (*Token, error)

func (*Queries) UpdateAuthCode

func (q *Queries) UpdateAuthCode(ctx context.Context, arg UpdateAuthCodeParams) (int64, error)

func (*Queries) UpdateAuthRequestUser

func (q *Queries) UpdateAuthRequestUser(ctx context.Context, arg UpdateAuthRequestUserParams) (int64, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type RefreshToken added in v0.1.2

type RefreshToken struct {
	ID            string
	AuthTime      int64
	Amr           sql.NullString
	Audience      string
	Subject       string
	ApplicationID string
	Expiration    int64
	Scopes        string
	CreatedAt     int64
}

func (*RefreshToken) GetAMR added in v0.1.2

func (r *RefreshToken) GetAMR() []string

func (*RefreshToken) GetAudience added in v0.1.2

func (r *RefreshToken) GetAudience() []string

func (*RefreshToken) GetAuthTime added in v0.1.2

func (r *RefreshToken) GetAuthTime() time.Time

func (*RefreshToken) GetClientID added in v0.1.2

func (r *RefreshToken) GetClientID() string

func (*RefreshToken) GetScopes added in v0.1.2

func (r *RefreshToken) GetScopes() []string

func (*RefreshToken) GetSubject added in v0.1.2

func (r *RefreshToken) GetSubject() string

func (*RefreshToken) SetCurrentScopes added in v0.1.2

func (r *RefreshToken) SetCurrentScopes(scopes []string)

type Token

type Token struct {
	ID             string
	AuthRequestID  sql.NullString
	ApplicationID  string
	RefreshTokenID sql.NullString
	Subject        string
	Audience       string
	Expiration     int64
	Scopes         string
	CreatedAt      int64
}

type UpdateAuthCodeParams

type UpdateAuthCodeParams struct {
	AuthCode sql.NullString
	ID       string
}

type UpdateAuthRequestUserParams

type UpdateAuthRequestUserParams struct {
	UserID          string
	AuthenticatedAt int64
	ID              string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL