Documentation ¶
Index ¶
- type AccessToken
- type Account
- type AccountPlatform
- type PullAccountInfo
- type RefreshToken
- type Tiphereth
- func (t *Tiphereth) CreateDefaultAdmin(ctx context.Context, user *User)
- func (t *Tiphereth) CreateUser(ctx context.Context, user *User) (*model.InternalID, *errors.Error)
- func (t *Tiphereth) GetToken(ctx context.Context, user *User) (AccessToken, RefreshToken, *errors.Error)
- func (t *Tiphereth) LinkAccount(ctx context.Context, a Account) (*Account, *errors.Error)
- func (t *Tiphereth) ListLinkAccount(ctx context.Context, paging model.Paging, id model.InternalID) ([]*Account, int64, *errors.Error)
- func (t *Tiphereth) ListUser(ctx context.Context, paging model.Paging, types []libauth.UserType, ...) ([]*User, int64, *errors.Error)
- func (t *Tiphereth) RefreshToken(ctx context.Context) (AccessToken, RefreshToken, *errors.Error)
- func (t *Tiphereth) UnLinkAccount(ctx context.Context, a Account) *errors.Error
- func (t *Tiphereth) UpdateUser(ctx context.Context, user *User, originPassword string) *errors.Error
- type TipherethRepo
- type User
- type UserStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken string
type AccountPlatform ¶ added in v0.0.2
type AccountPlatform int
const ( AccountPlatformUnspecified AccountPlatform = iota AccountPlatformSteam )
type PullAccountInfo ¶ added in v0.0.2
type PullAccountInfo struct { InternalID int64 Platform AccountPlatform PlatformAccountID string }
type RefreshToken ¶
type RefreshToken string
type Tiphereth ¶ added in v0.0.2
type Tiphereth struct {
// contains filtered or unexported fields
}
func NewTiphereth ¶ added in v0.0.2
func NewTiphereth( repo TipherethRepo, auth *libauth.Auth, mClient mapper.LibrarianMapperServiceClient, pClient porter.LibrarianPorterServiceClient, sClient searcher.LibrarianSearcherServiceClient, pullAccount *libmq.TopicImpl[PullAccountInfo], ) (*Tiphereth, error)
func (*Tiphereth) CreateDefaultAdmin ¶ added in v0.0.6
func (*Tiphereth) CreateUser ¶ added in v0.0.6
func (*Tiphereth) GetToken ¶ added in v0.0.2
func (t *Tiphereth) GetToken(ctx context.Context, user *User) (AccessToken, RefreshToken, *errors.Error)
func (*Tiphereth) LinkAccount ¶ added in v0.0.2
func (*Tiphereth) ListLinkAccount ¶ added in v0.0.6
func (*Tiphereth) RefreshToken ¶ added in v0.0.2
func (t *Tiphereth) RefreshToken(ctx context.Context) (AccessToken, RefreshToken, *errors.Error)
func (*Tiphereth) UnLinkAccount ¶ added in v0.0.6
type TipherethRepo ¶
type TipherethRepo interface { FetchUserByPassword(context.Context, *User) (*User, error) CreateUser(context.Context, *User, model.InternalID) error UpdateUser(context.Context, *User, string) error ListUser(context.Context, model.Paging, []model.InternalID, []libauth.UserType, []UserStatus, []model.InternalID, *model.InternalID) ([]*User, int64, error) CreateAccount(context.Context, Account, model.InternalID) error UpdateAccount(context.Context, Account) error UnLinkAccount(context.Context, Account, model.InternalID) error ListLinkAccount(context.Context, model.Paging, model.InternalID) ([]*Account, int64, error) }
type UserStatus ¶
type UserStatus int
const ( UserStatusUnspecified UserStatus = iota UserStatusActive UserStatusBlocked )
Click to show internal directories.
Click to hide internal directories.