repository

package
v0.0.0-...-0149ed5 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCode

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

func NewAuthCode

func NewAuthCode(db *datastore.Database) *AuthCode

func (*AuthCode) ReadAuthCode

func (ac *AuthCode) ReadAuthCode(ctx context.Context, code string, clientID typedef.ClientID) (*entity.AuthCode, error)

func (*AuthCode) RevokeAuthCode

func (ac *AuthCode) RevokeAuthCode(ctx context.Context, code string, clientID typedef.ClientID) (*entity.AuthCode, error)

type Cache

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

func NewCache

func NewCache(cache *datastore.Cache) *Cache

func (*Cache) Read

func (c *Cache) Read(ctx context.Context, key string) (string, error)

func (*Cache) ReadHash

func (c *Cache) ReadHash(ctx context.Context, key string, field string) (string, error)

func (*Cache) ReadHashAll

func (c *Cache) ReadHashAll(ctx context.Context, key string) (map[string]string, error)

func (*Cache) Write

func (c *Cache) Write(ctx context.Context, key string, value any, ttl time.Duration) error

func (*Cache) WriteHash

func (c *Cache) WriteHash(ctx context.Context, key string, values map[string]any, ttl time.Duration) error

type CheckHealth

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

func NewCheckHealth

func NewCheckHealth(db *datastore.Database, cache *datastore.Cache) *CheckHealth

func (*CheckHealth) PingCache

func (ch *CheckHealth) PingCache(ctx context.Context) error

func (*CheckHealth) PingDatabase

func (ch *CheckHealth) PingDatabase(ctx context.Context) error

type RedirectURI

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

func NewRedirectURI

func NewRedirectURI(db *datastore.Database) *RedirectURI

func (*RedirectURI) ReadRedirectURI

func (ru *RedirectURI) ReadRedirectURI(ctx context.Context, clientID typedef.ClientID) (*entity.RedirectURI, error)

type RelyingParty

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

func NewRelyingParty

func NewRelyingParty(db *datastore.Database) *RelyingParty

func (*RelyingParty) CreateAuthCode

func (rp *RelyingParty) CreateAuthCode(ctx context.Context, code string, clientID typedef.ClientID, userID typedef.UserID) (*entity.AuthCode, error)

func (*RelyingParty) ReadCredential

func (rp *RelyingParty) ReadCredential(ctx context.Context, clientID typedef.ClientID, clientSecret string) (*entity.RelyingParty, error)

func (*RelyingParty) ReadRedirectURIs

func (rp *RelyingParty) ReadRedirectURIs(ctx context.Context, clientID typedef.ClientID) ([]*entity.RedirectURI, error)

type User

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

func NewUser

func NewUser(opt *option.Option) *User

func (*User) CreateConsent

func (u *User) CreateConsent(ctx context.Context, userID typedef.UserID, clientID typedef.ClientID) (*entity.Consent, error)

func (*User) CreateUser

func (u *User) CreateUser(ctx context.Context, name string, pw string) (*entity.User, error)

func (*User) ReadConsent

func (u *User) ReadConsent(ctx context.Context, userID typedef.UserID, clientID typedef.ClientID) (*entity.Consent, error)

func (*User) ReadUser

func (u *User) ReadUser(ctx context.Context, name string) (*entity.User, error)

func (*User) ReadUserByID

func (u *User) ReadUserByID(ctx context.Context, id typedef.UserID) (*entity.User, error)

Jump to

Keyboard shortcuts

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