Documentation ¶
Index ¶
- Variables
- func CreatePlaceholders(start int, count int, builder *strings.Builder) *strings.Builder
- func ParseErrorIntoStatus(err error, status *sso.ResponseStatus) *sso.ResponseStatus
- func StartDatastore(ctx context.Context, datastore *Datastore) error
- func StopDataStore(ctx context.Context, datastore *Datastore)
- type AccountDoc
- type ClientDoc
- type Datastore
- func (d *Datastore) ClientExistsByID(ctx context.Context, clientID string, tx *sql.Tx) (bool, error)
- func (d *Datastore) IsAccountInTenant(ctx context.Context, accountID string, tenantID string) (bool, error)
- func (d *Datastore) RegisterEvent(event *sso.RegisterEventRequest)
- func (d *Datastore) RevokeScopes(ctx context.Context, req *sso.RevokeScopesRequest) error
- func (d *Datastore) RevokeToken(ctx context.Context, req *sso.RevokeTokenRequest) error
- func (d *Datastore) TenantExistsByID(ctx context.Context, tenantID string, tx *sql.Tx) (bool, error)
- func (d *Datastore) UpsertClient(ctx context.Context, req *sso.UpsertClientRequest) (*ClientDoc, error)
- func (d *Datastore) UpsertScope(ctx context.Context, req *sso.UpsertScopeRequest) (*ScopeDoc, error)
- func (d *Datastore) UpsertTenant(ctx context.Context, req *sso.UpsertTenantRequest) (*TenantDoc, error)
- type Options
- type ScopeDoc
- type ScopeI18nDoc
- type TenantDoc
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClientNotFound = errors.New("client not found")
View Source
var ErrScopeNotFound = errors.New("scope not found")
View Source
var ErrTenantNotFound = errors.New("tenant not found")
View Source
var ErrVersionMismatch = errors.New("version mismatch")
Functions ¶
func CreatePlaceholders ¶
func ParseErrorIntoStatus ¶
func ParseErrorIntoStatus(err error, status *sso.ResponseStatus) *sso.ResponseStatus
func StopDataStore ¶
Types ¶
type AccountDoc ¶
type ClientDoc ¶
type ClientDoc struct { ID string Name string `validate:"required" json:"name"` Secret string RedirectURIs []string `validate:"required,min=1,unique,dive,url" json:"redirect_uris"` Type sso.ClientType `validate:"min=0,max=1" json:"type"` CreatedAt time.Time UpdatedAt time.Time DeletedAt time.Time }
func (*ClientDoc) FromUpsertClientRequest ¶
func (c *ClientDoc) FromUpsertClientRequest(req *sso.UpsertClientRequest)
type Datastore ¶
type Datastore struct { Options *Options Client *sql.DB Logger *logrus.Logger IDGenerator28 *id.IDGenerator }
func (*Datastore) ClientExistsByID ¶
func (*Datastore) IsAccountInTenant ¶
func (*Datastore) RegisterEvent ¶
func (d *Datastore) RegisterEvent(event *sso.RegisterEventRequest)
func (*Datastore) RevokeScopes ¶
func (*Datastore) RevokeToken ¶
func (*Datastore) TenantExistsByID ¶
func (*Datastore) UpsertClient ¶
func (*Datastore) UpsertScope ¶
func (*Datastore) UpsertTenant ¶
type ScopeDoc ¶
type ScopeDoc struct { ID string ClientID string `validate:"required,len=28" json:"client_id"` Scope string `validate:"required,min=1,max=100" json:"scope"` CreatedAt time.Time UpdatedAt time.Time DeletedAt time.Time }
func (*ScopeDoc) FromUpsertScopeRequest ¶
func (s *ScopeDoc) FromUpsertScopeRequest(req *sso.UpsertScopeRequest)
type ScopeI18nDoc ¶
type ScopeI18nDoc struct { Description string `validate:"required,min=1,max=200" json:"description"` Locale string }
func (*ScopeI18nDoc) FromUpsertScopeRequest ¶
func (s *ScopeI18nDoc) FromUpsertScopeRequest(req *sso.UpsertScopeRequest)
Click to show internal directories.
Click to hide internal directories.