Documentation ¶
Index ¶
- type Tiphereth
- func (t *Tiphereth) CreateConfiguredAdmin()
- func (t *Tiphereth) CreateUser(ctx context.Context, user *modeltiphereth.User) (*model.InternalID, *errors.Error)
- func (t *Tiphereth) DeleteUserSession(ctx context.Context, id model.InternalID) *errors.Error
- func (t *Tiphereth) GainUserPrivilege(ctx context.Context, userID model.InternalID) (modeltiphereth.AccessToken, *errors.Error)
- func (t *Tiphereth) GetToken(ctx context.Context, username, password string, deviceID *model.InternalID) (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, id model.InternalID) ([]*modeltiphereth.Account, *errors.Error)
- func (t *Tiphereth) ListPorters(ctx context.Context, paging model.Paging) ([]*modeltiphereth.PorterInstance, int64, *errors.Error)
- func (t *Tiphereth) ListRegisteredDevices(ctx context.Context) ([]*modeltiphereth.DeviceInfo, *errors.Error)
- func (t *Tiphereth) ListUserSessions(ctx context.Context) ([]*modeltiphereth.UserSession, *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, deviceID *model.InternalID) (modeltiphereth.AccessToken, modeltiphereth.RefreshToken, *errors.Error)
- func (t *Tiphereth) RegisterDevice(ctx context.Context, device *modeltiphereth.DeviceInfo) (model.InternalID, *errors.Error)
- func (t *Tiphereth) UnLinkAccount(ctx context.Context, a modeltiphereth.Account) *errors.Error
- func (t *Tiphereth) UpdatePorterPrivilege(ctx context.Context, id model.InternalID, ...) *errors.Error
- func (t *Tiphereth) UpdatePorterStatus(ctx context.Context, id model.InternalID, ...) *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( app *libapp.Settings, repo TipherethRepo, auth *libauth.Auth, supv *supervisor.Supervisor, sClient *client.Searcher, pullAccount *libmq.Topic[modeltiphereth.PullAccountInfo], cron *libcron.Cron, ) (*Tiphereth, error)
func (*Tiphereth) CreateConfiguredAdmin ¶ added in v0.2.2
func (t *Tiphereth) CreateConfiguredAdmin()
func (*Tiphereth) CreateUser ¶ added in v0.0.6
func (t *Tiphereth) CreateUser(ctx context.Context, user *modeltiphereth.User) (*model.InternalID, *errors.Error)
func (*Tiphereth) DeleteUserSession ¶ added in v0.2.1
func (*Tiphereth) GainUserPrivilege ¶ added in v0.2.0
func (t *Tiphereth) GainUserPrivilege( ctx context.Context, userID model.InternalID, ) (modeltiphereth.AccessToken, *errors.Error)
func (*Tiphereth) GetToken ¶ added in v0.0.2
func (t *Tiphereth) GetToken( ctx context.Context, username, password string, deviceID *model.InternalID, ) (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 (t *Tiphereth) ListLinkAccounts( ctx context.Context, id model.InternalID, ) ([]*modeltiphereth.Account, *errors.Error)
func (*Tiphereth) ListPorters ¶ added in v0.2.0
func (t *Tiphereth) ListPorters( ctx context.Context, paging model.Paging, ) ([]*modeltiphereth.PorterInstance, int64, *errors.Error)
func (*Tiphereth) ListRegisteredDevices ¶ added in v0.2.3
func (t *Tiphereth) ListRegisteredDevices(ctx context.Context) ([]*modeltiphereth.DeviceInfo, *errors.Error)
func (*Tiphereth) ListUserSessions ¶ added in v0.2.1
func (t *Tiphereth) ListUserSessions(ctx context.Context) ([]*modeltiphereth.UserSession, *errors.Error)
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, deviceID *model.InternalID, ) (modeltiphereth.AccessToken, modeltiphereth.RefreshToken, *errors.Error)
func (*Tiphereth) RegisterDevice ¶ added in v0.2.1
func (t *Tiphereth) RegisterDevice( ctx context.Context, device *modeltiphereth.DeviceInfo, ) (model.InternalID, *errors.Error)
func (*Tiphereth) UnLinkAccount ¶ added in v0.0.6
func (*Tiphereth) UpdatePorterPrivilege ¶ added in v0.2.0
func (t *Tiphereth) UpdatePorterPrivilege( ctx context.Context, id model.InternalID, privilege *modeltiphereth.PorterInstancePrivilege, ) *errors.Error
func (*Tiphereth) UpdatePorterStatus ¶ added in v0.2.0
func (t *Tiphereth) UpdatePorterStatus( ctx context.Context, id model.InternalID, status modeltiphereth.PorterInstanceStatus, ) *errors.Error
func (*Tiphereth) UpdateUser ¶ added in v0.0.2
type TipherethRepo ¶
type TipherethRepo interface { FetchUserByPassword(context.Context, string, string) (*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) LinkAccount(context.Context, modeltiphereth.Account, model.InternalID) (model.InternalID, error) UnLinkAccount(context.Context, modeltiphereth.Account, model.InternalID) error ListLinkAccounts(context.Context, model.InternalID) ([]*modeltiphereth.Account, error) GetUser(context.Context, model.InternalID) (*modeltiphereth.User, error) UpsertPorters(context.Context, []*modeltiphereth.PorterInstance) error ListPorters(context.Context, model.Paging) ([]*modeltiphereth.PorterInstance, int64, error) UpdatePorterStatus(context.Context, model.InternalID, modeltiphereth.PorterInstanceStatus) error UpdatePorterPrivilege(context.Context, model.InternalID, model.InternalID, *modeltiphereth.PorterInstancePrivilege) error FetchPorterPrivilege(context.Context, model.InternalID, model.InternalID) ( *modeltiphereth.PorterInstancePrivilege, error) CreateDevice(context.Context, *modeltiphereth.DeviceInfo) error ListUserSessions(context.Context, model.InternalID) ([]*modeltiphereth.UserSession, error) DeleteUserSession(context.Context, model.InternalID, model.InternalID) error FetchDeviceInfo(context.Context, model.InternalID) (*modeltiphereth.DeviceInfo, error) CreateUserSession(context.Context, *modeltiphereth.UserSession) error FetchUserSession(context.Context, model.InternalID, string) (*modeltiphereth.UserSession, error) UpdateUserSession(context.Context, *modeltiphereth.UserSession) error ListDevices(context.Context, model.InternalID) ([]*modeltiphereth.DeviceInfo, error) }
Click to show internal directories.
Click to hide internal directories.