Documentation ¶
Index ¶
- type Tiphereth
- func (t *Tiphereth) CreateDefaultAdmin(ctx context.Context, user *modeltiphereth.User)
- func (t *Tiphereth) CreateUser(ctx context.Context, user *modeltiphereth.User) (*model.InternalID, *errors.Error)
- func (t *Tiphereth) GetToken(ctx context.Context, user *modeltiphereth.User) (modeltiphereth.AccessToken, modeltiphereth.RefreshToken, *errors.Error)
- func (t *Tiphereth) GetUser(ctx context.Context, id *model.InternalID) (*modeltiphereth.User, *errors.Error)
- func (t *Tiphereth) LinkAccount(ctx context.Context, a modeltiphereth.Account) (*modeltiphereth.Account, *errors.Error)
- func (t *Tiphereth) ListLinkAccounts(ctx context.Context, paging model.Paging, id model.InternalID) ([]*modeltiphereth.Account, int64, *errors.Error)
- func (t *Tiphereth) ListUsers(ctx context.Context, paging model.Paging, types []libauth.UserType, ...) ([]*modeltiphereth.User, int64, *errors.Error)
- func (t *Tiphereth) RefreshToken(ctx context.Context) (modeltiphereth.AccessToken, modeltiphereth.RefreshToken, *errors.Error)
- func (t *Tiphereth) UnLinkAccount(ctx context.Context, a modeltiphereth.Account) *errors.Error
- func (t *Tiphereth) UpdateUser(ctx context.Context, user *modeltiphereth.User, originPassword string) *errors.Error
- type TipherethRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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.Topic[modeltiphereth.PullAccountInfo], ) (*Tiphereth, error)
func (*Tiphereth) CreateDefaultAdmin ¶ added in v0.0.6
func (t *Tiphereth) CreateDefaultAdmin(ctx context.Context, user *modeltiphereth.User)
func (*Tiphereth) CreateUser ¶ added in v0.0.6
func (t *Tiphereth) CreateUser(ctx context.Context, user *modeltiphereth.User) (*model.InternalID, *errors.Error)
func (*Tiphereth) GetToken ¶ added in v0.0.2
func (t *Tiphereth) GetToken( ctx context.Context, user *modeltiphereth.User, ) (modeltiphereth.AccessToken, modeltiphereth.RefreshToken, *errors.Error)
func (*Tiphereth) GetUser ¶ added in v0.0.8
func (t *Tiphereth) GetUser(ctx context.Context, id *model.InternalID) (*modeltiphereth.User, *errors.Error)
func (*Tiphereth) LinkAccount ¶ added in v0.0.2
func (t *Tiphereth) LinkAccount( ctx context.Context, a modeltiphereth.Account, ) (*modeltiphereth.Account, *errors.Error)
func (*Tiphereth) ListLinkAccounts ¶ added in v0.0.10
func (*Tiphereth) ListUsers ¶ added in v0.0.10
func (t *Tiphereth) ListUsers( ctx context.Context, paging model.Paging, types []libauth.UserType, statuses []modeltiphereth.UserStatus, ) ([]*modeltiphereth.User, int64, *errors.Error)
func (*Tiphereth) RefreshToken ¶ added in v0.0.2
func (t *Tiphereth) RefreshToken( ctx context.Context, ) (modeltiphereth.AccessToken, modeltiphereth.RefreshToken, *errors.Error)
func (*Tiphereth) UnLinkAccount ¶ added in v0.0.6
func (*Tiphereth) UpdateUser ¶ added in v0.0.2
type TipherethRepo ¶
type TipherethRepo interface { FetchUserByPassword(context.Context, *modeltiphereth.User) (*modeltiphereth.User, error) CreateUser(context.Context, *modeltiphereth.User, model.InternalID) error UpdateUser(context.Context, *modeltiphereth.User, string) error ListUsers(context.Context, model.Paging, []model.InternalID, []libauth.UserType, []modeltiphereth.UserStatus, []model.InternalID, *model.InternalID) ([]*modeltiphereth.User, int64, error) CreateAccount(context.Context, modeltiphereth.Account, model.InternalID) error UnLinkAccount(context.Context, modeltiphereth.Account, model.InternalID) error ListLinkAccounts(context.Context, model.Paging, model.InternalID) ([]*modeltiphereth.Account, int64, error) GetUser(context.Context, model.InternalID) (*modeltiphereth.User, error) }
Click to show internal directories.
Click to hide internal directories.