Documentation
¶
Index ¶
- type Database
- type Service
- func (s Service) Create(ctx context.Context, name string) (model.User, error)
- func (s Service) CreateBasic(ctx context.Context, login, password string) (model.User, error)
- func (s Service) CreateDiscord(ctx context.Context, id, username, avatar string) (model.User, error)
- func (s Service) CreateGithub(ctx context.Context, id uint64, login string) (model.User, error)
- func (s Service) CreateLink(ctx context.Context, externalID, description string) (string, error)
- func (s Service) Delete(ctx context.Context, o model.User) error
- func (s Service) DoAtomic(ctx context.Context, action func(context.Context) error) error
- func (s Service) GetBasicUser(ctx context.Context, login, password string) (model.User, error)
- func (s Service) GetDiscordUser(ctx context.Context, id string) (model.User, error)
- func (s Service) GetGitHubUser(ctx context.Context, id uint64) (model.User, error)
- func (s Service) GetLinkByToken(ctx context.Context, token string) (model.Link, error)
- func (s Service) IsAuthorized(ctx context.Context, user model.User, profile string) bool
- func (s Service) List(ctx context.Context, ids ...string) ([]model.User, error)
- func (s Service) Unlink(ctx context.Context, externalID string) error
- func (s Service) UpdateDiscordUser(ctx context.Context, user model.User, id, username, avatar string) (model.User, error)
- func (s Service) UpdateGitHubUser(ctx context.Context, user model.User, githubID uint64, githubLogin string) (model.User, error)
- func (s Service) UpdatePassword(ctx context.Context, user model.User, password string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface {
Get(context.Context, func(pgx.Row) error, string, ...any) error
Create(context.Context, string, ...any) (uint64, error)
One(context.Context, string, ...any) error
List(context.Context, func(pgx.Rows) error, string, ...any) error
DoAtomic(context.Context, func(context.Context) error) error
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (Service) CreateBasic ¶ added in v3.0.1
func (Service) CreateDiscord ¶ added in v3.4.2
func (Service) CreateGithub ¶ added in v3.0.1
func (Service) CreateLink ¶ added in v3.6.0
func (Service) GetBasicUser ¶
func (Service) GetDiscordUser ¶ added in v3.1.0
func (Service) GetGitHubUser ¶
func (Service) GetLinkByToken ¶ added in v3.6.1
func (Service) IsAuthorized ¶
func (Service) UpdateDiscordUser ¶ added in v3.1.0
func (Service) UpdateGitHubUser ¶
Click to show internal directories.
Click to hide internal directories.