mongo

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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 NewScopes added in v0.0.9

func NewScopes(m *Models, db *mongo.Database) (res interfaces.Scopes, err error)

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) Add

func (c *AuthCode) Add(enableTracing bool, ctx context.Context, req *auth.AuthCodeList) (err error)

func (*AuthCode) Del

func (c *AuthCode) Del(enableTracing bool, ctx context.Context, req *auth.AuthCodeList) (err error)

func (*AuthCode) FindByCode

func (c *AuthCode) FindByCode(enableTracing bool, ctx context.Context, code string) (res []*auth.AuthCodeList, err error)

func (*AuthCode) FindByState

func (c *AuthCode) FindByState(enableTracing bool, ctx context.Context, state string) (res []*auth.AuthCodeList, err error)

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) Id added in v0.0.9

func (c *Models) Id() string

func (*Models) Init added in v0.0.9

func (c *Models) Init() (err 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) CountAll added in v0.0.9

func (c *Scopes) CountAll(enableTracing bool, ctx context.Context, req *auth.GetScopesRequest) (count int64, err error)

func (*Scopes) Create added in v0.0.9

func (c *Scopes) Create(enableTracing bool, ctx context.Context, req *auth.ScopeList) (err error)

func (*Scopes) Delete added in v0.0.9

func (c *Scopes) Delete(enableTracing bool, ctx context.Context, req *auth.DeleteScopesRequest) (err error)

func (*Scopes) Edit added in v0.0.9

func (c *Scopes) Edit(enableTracing bool, ctx context.Context, req *auth.ScopeList) (err error)

func (*Scopes) Find added in v0.0.9

func (c *Scopes) Find(enableTracing bool, ctx context.Context, filter interface{}, opts *options.FindOptions) (res []*auth.ScopeList, err error)

func (*Scopes) FindByDefault added in v0.0.9

func (c *Scopes) FindByDefault(enableTracing bool, ctx context.Context, isDefault bool) (res []*auth.ScopeList, err error)

func (*Scopes) FindByDefaultAndTag added in v0.0.9

func (c *Scopes) FindByDefaultAndTag(enableTracing bool, ctx context.Context, isDefault bool, tag []string) (res []*auth.ScopeList, err error)

func (*Scopes) FindByID added in v0.0.9

func (c *Scopes) FindByID(enableTracing bool, ctx context.Context, id string) (res []*auth.ScopeList, err error)

func (*Scopes) FindByMethodsAndDefault added in v0.0.9

func (c *Scopes) FindByMethodsAndDefault(enableTracing bool, ctx context.Context, method []string, isDefault bool) (res []*auth.ScopeList, err error)

func (*Scopes) FindByMethodsAndDefaultAndIDAndEnable added in v0.0.9

func (c *Scopes) FindByMethodsAndDefaultAndIDAndEnable(enableTracing bool, ctx context.Context, method, id []string, isDefault, enable bool) (res []*auth.ScopeList, err error)

func (*Scopes) FindByMethodsAndDefaultAndTag added in v0.0.9

func (c *Scopes) FindByMethodsAndDefaultAndTag(enableTracing bool, ctx context.Context, method []string, tag string, isDefault bool) (res []*auth.ScopeList, err error)

func (*Scopes) FindByMethodsAndDefaultAndTagAndEnable added in v0.0.9

func (c *Scopes) FindByMethodsAndDefaultAndTagAndEnable(enableTracing bool, ctx context.Context, method []string, tag string, isDefault bool, enable bool) (res []*auth.ScopeList, err error)

func (*Scopes) FindByMultipleID added in v0.0.9

func (c *Scopes) FindByMultipleID(enableTracing bool, ctx context.Context, id []string) (res []*auth.ScopeList, err error)

func (*Scopes) FindByMultipleIDAndDefault added in v0.0.9

func (c *Scopes) FindByMultipleIDAndDefault(enableTracing bool, ctx context.Context, id []string, isDefault bool) (res []*auth.ScopeList, err error)

func (*Scopes) FindByMultipleIDAndDefaultAndTagAndMethod added in v0.0.9

func (c *Scopes) FindByMultipleIDAndDefaultAndTagAndMethod(enableTracing bool, ctx context.Context, id []string, isDefault bool, tag string, method string) (res []*auth.ScopeList, err error)

func (*Scopes) FindIfExist added in v0.0.9

func (c *Scopes) FindIfExist(enableTracing bool, ctx context.Context, id, method string, isDefault bool) (res []*auth.ScopeList, err error)

func (*Scopes) FindWithParams added in v0.0.9

func (c *Scopes) FindWithParams(enableTracing bool, ctx context.Context, req *auth.GetScopesRequest) (res []*auth.ScopeList, err error)

func (*Scopes) GetData added in v0.0.9

func (c *Scopes) GetData(enableTracing bool, ctx context.Context, limit, skip int) (res []*auth.ScopeList, err error)

GetData - this for migration data

func (*Scopes) UpsetData added in v0.0.9

func (c *Scopes) UpsetData(req *auth.ScopeList) (err error)

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) Id

func (c *Storage) Id() string

func (*Storage) Init

func (c *Storage) Init() (err error)

func (*Storage) Tokens

func (c *Storage) Tokens() interfaces.Tokens

type Tokens

type Tokens struct {
	// contains filtered or unexported fields
}

func (*Tokens) DeleteToken

func (c *Tokens) DeleteToken(enableTracing bool, ctx context.Context, userid, id string) (err error)

func (*Tokens) Find

func (c *Tokens) Find(enableTracing bool, ctx context.Context, query interface{}) (res []*auth.TokenList, err error)

func (*Tokens) FindByID

func (c *Tokens) FindByID(enableTracing bool, ctx context.Context, param string) (res []*auth.TokenList, err error)

func (*Tokens) GetToken

func (c *Tokens) GetToken(enableTracing bool, ctx context.Context, userid, id, appId string, withApp bool) (res types.TokenData, err error)

func (*Tokens) InsertToken

func (c *Tokens) InsertToken(enableTracing bool, ctx context.Context, req *auth.TokenList) (err error)

func (*Tokens) RevokeToken

func (c *Tokens) RevokeToken(enableTracing bool, ctx context.Context, userid, id string) (err error)

func (*Tokens) TerminateOtherTokens

func (c *Tokens) TerminateOtherTokens(enableTracing bool, ctx context.Context, userid, id string) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL