Documentation ¶
Index ¶
- func NewApplications(m *Models, db *mongo.Database) (res interfaces.Applications, err error)
- func NewAuthCode(mm interfaces.Models, m *Storage, db *mongo.Database) (res interfaces.AuthCode, err error)
- func NewModels(mm interfaces.Models, opt *interfaces.AuthOption, database interface{}) interfaces.Models
- func NewScopes(m *Models, db *mongo.Database) (res interfaces.Scopes, err error)
- func NewStorage(mm interfaces.Models, opt *interfaces.AuthOption, database interface{}) interfaces.Storage
- func NewTokens(mm interfaces.Models, m *Storage, db *mongo.Database) (res interfaces.Tokens, err error)
- type Applications
- func (c *Applications) BulkInsert(enableTracing bool, ctx context.Context, req []*auth.ApplicationList) (err error)
- func (c *Applications) CountAll(enableTracing bool, ctx context.Context, req *auth.GetApplicationRequest) (count int64, err error)
- func (c *Applications) Create(enableTracing bool, ctx context.Context, req *auth.ApplicationList) (err error)
- func (c *Applications) Delete(enableTracing bool, ctx context.Context, req *auth.DeleteApplicationRequest) (err error)
- func (c *Applications) Find(enableTracing bool, ctx context.Context, filter interface{}, ...) (res []*auth.ApplicationList, err error)
- func (c *Applications) FindByDefault(enableTracing bool, ctx context.Context, isDefault bool) (res []*auth.ApplicationList, err error)
- func (c *Applications) FindByID(enableTracing bool, ctx context.Context, id string) (res []*auth.ApplicationList, err error)
- func (c *Applications) FindByIDAndDefault(enableTracing bool, ctx context.Context, id string, isDefault bool) (res []*auth.ApplicationList, err error)
- func (c *Applications) FindByMultipleIDAndDefault(enableTracing bool, ctx context.Context, id []string, isDefault bool) (res []*auth.ApplicationList, err error)
- func (c *Applications) FindByName(enableTracing bool, ctx context.Context, name string) (res []*auth.ApplicationList, err error)
- func (c *Applications) FindWithParams(enableTracing bool, ctx context.Context, req *auth.GetApplicationRequest) (res []*auth.ApplicationList, err error)
- func (c *Applications) GetData(enableTracing bool, ctx context.Context, limit, skip int) (res []*auth.ApplicationList, err error)
- func (c *Applications) Update(enableTracing bool, ctx context.Context, req *auth.EditApplicationRequest) (err error)
- type AuthCode
- func (c *AuthCode) Add(enableTracing bool, ctx context.Context, req *auth.AuthCodeList) (err error)
- func (c *AuthCode) Del(enableTracing bool, ctx context.Context, req *auth.AuthCodeList) (err error)
- func (c *AuthCode) FindByCode(enableTracing bool, ctx context.Context, code string) (res []*auth.AuthCodeList, err error)
- func (c *AuthCode) FindByState(enableTracing bool, ctx context.Context, state string) (res []*auth.AuthCodeList, err error)
- type Models
- func (c *Models) Applications() interfaces.Applications
- func (c *Models) CreteIndex(col *mongo.Collection, mongoIndexModel []types.MongoIndex) error
- func (c *Models) Id() string
- func (c *Models) Init() (err error)
- func (c *Models) Logs() interfaces.Logs
- func (c *Models) Scopes() interfaces.Scopes
- func (c *Models) UserListsApplications() interfaces.UserListsApplications
- func (c *Models) UserListsGroups() interfaces.UserListsGroups
- func (c *Models) Users() interfaces.Users
- func (c *Models) UsersGroupApplications() interfaces.UsersGroupApplications
- func (c *Models) UsersGroupScopes() interfaces.UsersGroupScopes
- func (c *Models) UsersGroups() interfaces.UsersGroups
- type Scopes
- func (c *Scopes) BulkInsert(enableTracing bool, ctx context.Context, req []*auth.ScopeList) (err error)
- func (c *Scopes) CountAll(enableTracing bool, ctx context.Context, req *auth.GetScopesRequest) (count int64, err error)
- func (c *Scopes) Create(enableTracing bool, ctx context.Context, req *auth.ScopeList) (err error)
- func (c *Scopes) Delete(enableTracing bool, ctx context.Context, req *auth.DeleteScopesRequest) (err error)
- func (c *Scopes) Edit(enableTracing bool, ctx context.Context, req *auth.ScopeList) (err error)
- func (c *Scopes) Find(enableTracing bool, ctx context.Context, filter interface{}, ...) (res []*auth.ScopeList, err error)
- func (c *Scopes) FindByDefault(enableTracing bool, ctx context.Context, isDefault bool) (res []*auth.ScopeList, err error)
- func (c *Scopes) FindByDefaultAndTag(enableTracing bool, ctx context.Context, isDefault bool, tag []string) (res []*auth.ScopeList, err error)
- func (c *Scopes) FindByID(enableTracing bool, ctx context.Context, id string) (res []*auth.ScopeList, err error)
- func (c *Scopes) FindByMethodsAndDefault(enableTracing bool, ctx context.Context, method []string, isDefault bool) (res []*auth.ScopeList, err error)
- func (c *Scopes) FindByMethodsAndDefaultAndIDAndEnable(enableTracing bool, ctx context.Context, method, id []string, ...) (res []*auth.ScopeList, err error)
- func (c *Scopes) FindByMethodsAndDefaultAndTag(enableTracing bool, ctx context.Context, method []string, tag string, ...) (res []*auth.ScopeList, err error)
- func (c *Scopes) FindByMethodsAndDefaultAndTagAndEnable(enableTracing bool, ctx context.Context, method []string, tag string, ...) (res []*auth.ScopeList, err error)
- func (c *Scopes) FindByMultipleID(enableTracing bool, ctx context.Context, id []string) (res []*auth.ScopeList, err error)
- func (c *Scopes) FindByMultipleIDAndDefault(enableTracing bool, ctx context.Context, id []string, isDefault bool) (res []*auth.ScopeList, err error)
- func (c *Scopes) FindByMultipleIDAndDefaultAndTagAndMethod(enableTracing bool, ctx context.Context, id []string, isDefault bool, ...) (res []*auth.ScopeList, err error)
- func (c *Scopes) FindIfExist(enableTracing bool, ctx context.Context, id, method string, isDefault bool) (res []*auth.ScopeList, err error)
- func (c *Scopes) FindWithParams(enableTracing bool, ctx context.Context, req *auth.GetScopesRequest) (res []*auth.ScopeList, err error)
- func (c *Scopes) GetData(enableTracing bool, ctx context.Context, limit, skip int) (res []*auth.ScopeList, err error)
- func (c *Scopes) UpsetData(req *auth.ScopeList) (err error)
- type Storage
- type Tokens
- func (c *Tokens) DeleteToken(enableTracing bool, ctx context.Context, userid, id string) (err error)
- func (c *Tokens) Find(enableTracing bool, ctx context.Context, query interface{}) (res []*auth.TokenList, err error)
- func (c *Tokens) FindByID(enableTracing bool, ctx context.Context, param string) (res []*auth.TokenList, err error)
- func (c *Tokens) GetToken(enableTracing bool, ctx context.Context, userid, id, appId string, ...) (res types.TokenData, err error)
- func (c *Tokens) InsertToken(enableTracing bool, ctx context.Context, req *auth.TokenList) (err error)
- func (c *Tokens) RevokeToken(enableTracing bool, ctx context.Context, userid, id string) (err error)
- func (c *Tokens) TerminateOtherTokens(enableTracing bool, ctx context.Context, userid, id string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewApplications ¶ added in v0.0.9
func NewApplications(m *Models, db *mongo.Database) (res interfaces.Applications, err error)
func NewAuthCode ¶
func NewAuthCode(mm interfaces.Models, m *Storage, db *mongo.Database) (res interfaces.AuthCode, err error)
func NewModels ¶ added in v0.0.9
func NewModels(mm interfaces.Models, opt *interfaces.AuthOption, database interface{}) interfaces.Models
func NewStorage ¶
func NewStorage(mm interfaces.Models, opt *interfaces.AuthOption, database interface{}) interfaces.Storage
func NewTokens ¶
func NewTokens(mm interfaces.Models, m *Storage, db *mongo.Database) (res interfaces.Tokens, err error)
Types ¶
type Applications ¶ added in v0.0.9
type Applications struct {
// contains filtered or unexported fields
}
func (*Applications) BulkInsert ¶ added in v0.0.9
func (c *Applications) BulkInsert(enableTracing bool, ctx context.Context, req []*auth.ApplicationList) (err error)
BulkInsert - this for migration data
func (*Applications) CountAll ¶ added in v0.0.9
func (c *Applications) CountAll(enableTracing bool, ctx context.Context, req *auth.GetApplicationRequest) (count int64, err error)
func (*Applications) Create ¶ added in v0.0.9
func (c *Applications) Create(enableTracing bool, ctx context.Context, req *auth.ApplicationList) (err error)
func (*Applications) Delete ¶ added in v0.0.9
func (c *Applications) Delete(enableTracing bool, ctx context.Context, req *auth.DeleteApplicationRequest) (err error)
func (*Applications) Find ¶ added in v0.0.9
func (c *Applications) Find(enableTracing bool, ctx context.Context, filter interface{}, opts *options.FindOptions) (res []*auth.ApplicationList, err error)
func (*Applications) FindByDefault ¶ added in v0.0.9
func (c *Applications) FindByDefault(enableTracing bool, ctx context.Context, isDefault bool) (res []*auth.ApplicationList, err error)
func (*Applications) FindByID ¶ added in v0.0.9
func (c *Applications) FindByID(enableTracing bool, ctx context.Context, id string) (res []*auth.ApplicationList, err error)
func (*Applications) FindByIDAndDefault ¶ added in v0.0.9
func (c *Applications) FindByIDAndDefault(enableTracing bool, ctx context.Context, id string, isDefault bool) (res []*auth.ApplicationList, err error)
func (*Applications) FindByMultipleIDAndDefault ¶ added in v0.0.9
func (c *Applications) FindByMultipleIDAndDefault(enableTracing bool, ctx context.Context, id []string, isDefault bool) (res []*auth.ApplicationList, err error)
func (*Applications) FindByName ¶ added in v0.0.9
func (c *Applications) FindByName(enableTracing bool, ctx context.Context, name string) (res []*auth.ApplicationList, err error)
func (*Applications) FindWithParams ¶ added in v0.0.9
func (c *Applications) FindWithParams(enableTracing bool, ctx context.Context, req *auth.GetApplicationRequest) (res []*auth.ApplicationList, err error)
func (*Applications) GetData ¶ added in v0.0.9
func (c *Applications) GetData(enableTracing bool, ctx context.Context, limit, skip int) (res []*auth.ApplicationList, err error)
GetData - this for migration data
func (*Applications) Update ¶ added in v0.0.9
func (c *Applications) Update(enableTracing bool, ctx context.Context, req *auth.EditApplicationRequest) (err error)
type AuthCode ¶
type AuthCode struct {
// contains filtered or unexported fields
}
func (*AuthCode) FindByCode ¶
func (*AuthCode) FindByState ¶
type Models ¶ added in v0.0.9
type Models struct { Options *interfaces.AuthOption DefaultTimeout time.Duration // contains filtered or unexported fields }
func (*Models) Applications ¶ added in v0.0.9
func (c *Models) Applications() interfaces.Applications
func (*Models) CreteIndex ¶ added in v0.0.9
func (c *Models) CreteIndex(col *mongo.Collection, mongoIndexModel []types.MongoIndex) error
func (*Models) Logs ¶ added in v0.0.9
func (c *Models) Logs() interfaces.Logs
func (*Models) Scopes ¶ added in v0.0.9
func (c *Models) Scopes() interfaces.Scopes
func (*Models) UserListsApplications ¶ added in v0.0.9
func (c *Models) UserListsApplications() interfaces.UserListsApplications
func (*Models) UserListsGroups ¶ added in v0.0.9
func (c *Models) UserListsGroups() interfaces.UserListsGroups
func (*Models) Users ¶ added in v0.0.9
func (c *Models) Users() interfaces.Users
func (*Models) UsersGroupApplications ¶ added in v0.0.9
func (c *Models) UsersGroupApplications() interfaces.UsersGroupApplications
func (*Models) UsersGroupScopes ¶ added in v0.0.9
func (c *Models) UsersGroupScopes() interfaces.UsersGroupScopes
func (*Models) UsersGroups ¶ added in v0.0.9
func (c *Models) UsersGroups() interfaces.UsersGroups
type Scopes ¶ added in v0.0.9
type Scopes struct {
// contains filtered or unexported fields
}
func (*Scopes) BulkInsert ¶ added in v0.0.9
func (c *Scopes) BulkInsert(enableTracing bool, ctx context.Context, req []*auth.ScopeList) (err error)
BulkInsert - this for migration data
func (*Scopes) FindByDefault ¶ added in v0.0.9
func (*Scopes) FindByDefaultAndTag ¶ added in v0.0.9
func (*Scopes) FindByMethodsAndDefault ¶ added in v0.0.9
func (*Scopes) FindByMethodsAndDefaultAndIDAndEnable ¶ added in v0.0.9
func (*Scopes) FindByMethodsAndDefaultAndTag ¶ added in v0.0.9
func (*Scopes) FindByMethodsAndDefaultAndTagAndEnable ¶ added in v0.0.9
func (*Scopes) FindByMultipleID ¶ added in v0.0.9
func (*Scopes) FindByMultipleIDAndDefault ¶ added in v0.0.9
func (*Scopes) FindByMultipleIDAndDefaultAndTagAndMethod ¶ added in v0.0.9
func (*Scopes) FindIfExist ¶ added in v0.0.9
func (*Scopes) FindWithParams ¶ added in v0.0.9
type Storage ¶
type Storage struct { Options *interfaces.AuthOption DefaultTimeout time.Duration // contains filtered or unexported fields }
func (*Storage) AuthCode ¶
func (c *Storage) AuthCode() interfaces.AuthCode
func (*Storage) CreteIndex ¶
func (c *Storage) CreteIndex(col *mongo.Collection, mongoIndexModel []types.MongoIndex) error
func (*Storage) Tokens ¶
func (c *Storage) Tokens() interfaces.Tokens
type Tokens ¶
type Tokens struct {
// contains filtered or unexported fields
}
func (*Tokens) DeleteToken ¶
func (*Tokens) InsertToken ¶
func (*Tokens) RevokeToken ¶
Click to show internal directories.
Click to hide internal directories.