Documentation ¶
Overview ¶
Copyright 2018 Keydap. All rights reserved. Licensed under the Apache License, Version 2.0, see LICENSE.
Index ¶
- Variables
- type Index
- type Silo
- func (sl *Silo) Authenticate(principal string, password string) (lr base.LoginResult, err error)
- func (sl *Silo) ChangePassword(cpContext *base.ChangePasswordContext) (err error)
- func (sl *Silo) Close()
- func (sl *Silo) Csn() base.Csn
- func (sl *Silo) Delete(delCtx *base.DeleteContext) (err error)
- func (sl *Silo) DeleteSecurityKey(userId string, credentialId string) (*base.Resource, error)
- func (sl *Silo) DumpJSON(bkFilePath string, overwrite bool, rt *schema.ResourceType) error
- func (sl *Silo) FindResources(filter *base.FilterNode, rt *schema.ResourceType) []*base.Resource
- func (sl *Silo) GenWebauthnIdFor(userId string) (*base.Resource, error)
- func (sl *Silo) Get(rid string, rt *schema.ResourceType) (resource *base.Resource, err error)
- func (sl *Silo) GetMaxIndexedValOfAt(rt *schema.ResourceType, atName string) (int64, error)
- func (sl *Silo) GetUser(rid string) (resource *base.Resource, err error)
- func (sl *Silo) GetUserByName(username string) (user *base.Resource, err error)
- func (sl *Silo) GetUserByWebauthnId(webauthnId string) (user *base.Resource, err error)
- func (sl *Silo) Insert(crCtx *base.CreateContext) (err error)
- func (sl *Silo) InsertInternal(crCtx *base.CreateContext) (err error)
- func (sl *Silo) LoadGroups()
- func (sl *Silo) ModifyGroupsOfUser(mgur base.ModifyGroupsOfUserRequest) (res *base.Resource, err error)
- func (sl *Silo) Patch(patchCtx *base.PatchContext) (err error)
- func (sl *Silo) ReadAllOfType(rt *schema.ResourceType, outPipe chan *base.Resource) error
- func (sl *Silo) Replace(replaceCtx *base.ReplaceContext) (err error)
- func (sl *Silo) Search(sc *base.SearchContext, outPipe chan *base.Resource) error
- func (sl *Silo) StoreSecurityKey(rid string, secKey *base.SecurityKey) (*base.Resource, error)
- func (sl *Silo) StoreTotpSecret(rid string, totpSecret string) error
- func (sl *Silo) UpdateAuthData(rid string, version string, ad base.AuthData) error
- func (sl *Silo) VerifyOtp(rid string, totpCode string) (lr base.LoginResult, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // a bucket that holds the names of the resource buckets e.g users, groups etc. BUC_RESOURCES = []byte("resources") // a bucket that holds the names of the resource buckets e.g users, groups etc. BUC_INDICES = []byte("indices") // a bucket that holds the unique ids of users that are registered for Webauthn. BUC_WEBAUTHN = []byte("webauthn") // the delimiter that separates resource and index name RES_INDEX_DELIM = ":" DUP_KEY_VAL = []byte{0} )
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct { Bname string // name of the bucket Name string BnameBytes []byte AllowDupKey bool ValType string // save the attribute's type name as a string CaseSensitive bool // contains filtered or unexported fields }
func (*Index) GetRid ¶
Get the resource ID associated with the given attribute value This method is only applicable for unique attributes
func (*Index) GetRids ¶
Get the resource ID associated with the given attribute value This method is applicable for multivalued attributes only
func (*Index) HasKeyAndVal ¶
Checks if the given key value pair exist in the index
type Silo ¶
type Silo struct { Engine *rbac.RbacEngine // contains filtered or unexported fields }
func (*Silo) Authenticate ¶
func (*Silo) ChangePassword ¶
func (sl *Silo) ChangePassword(cpContext *base.ChangePasswordContext) (err error)
func (*Silo) DeleteSecurityKey ¶
func (*Silo) FindResources ¶
func (sl *Silo) FindResources(filter *base.FilterNode, rt *schema.ResourceType) []*base.Resource
intended for internal use only, must NOT be used for filters that return large number of resources
func (*Silo) GenWebauthnIdFor ¶
func (*Silo) GetMaxIndexedValOfAt ¶
func (*Silo) GetUserByName ¶
func (*Silo) GetUserByWebauthnId ¶
func (*Silo) InsertInternal ¶
func (sl *Silo) InsertInternal(crCtx *base.CreateContext) (err error)
func (*Silo) LoadGroups ¶
func (sl *Silo) LoadGroups()
func (*Silo) ModifyGroupsOfUser ¶
func (*Silo) ReadAllOfType ¶
func (*Silo) StoreSecurityKey ¶
func (*Silo) UpdateAuthData ¶
Click to show internal directories.
Click to hide internal directories.