authtable

package
v0.0.0-...-caf495c Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthTable

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

Authtable

func Get

func Get(name string) *AuthTable

Get retrieves a AuthTable by name

func New

func New(name string, configFile *os.File, s schema.Schema, fileOn uint16, dataOnDrive bool, memOnly bool) (*AuthTable, helpers.Error)

New creates a new AuthTable with the provided name, schema, and other parameters.

func Restore

func Restore(name string) (*AuthTable, helpers.Error)

Restore restores an AuthTable by name; requires a valid config file and data folder

func (*AuthTable) AltLoginItem

func (t *AuthTable) AltLoginItem() string

func (*AuthTable) ChangeUserPassword

func (t *AuthTable) ChangeUserPassword(userName string, password string, newPassword string) helpers.Error

ChangeUserPassword

func (*AuthTable) Close

func (t *AuthTable) Close(save bool)

func (*AuthTable) Delete

func (t *AuthTable) Delete() helpers.Error

Delete deletes the AuthTable from memory and disk

func (*AuthTable) DeleteUser

func (t *AuthTable) DeleteUser(userName string, password string) helpers.Error

DeleteUser

func (*AuthTable) EncryptCost

func (t *AuthTable) EncryptCost() int

func (*AuthTable) Get

func (t *AuthTable) Get(userName string, password string) (*authTableEntry, int)

func (*AuthTable) GetUser

func (t *AuthTable) GetUser(userName string, password string, items map[string]interface{}) (map[string]interface{}, helpers.Error)

GetUserData

func (*AuthTable) NewUser

func (t *AuthTable) NewUser(name string, password string, insertObj map[string]interface{}) (*authTableEntry, helpers.Error)

NewUser creates a new authTableEntry in the AuthTable

func (*AuthTable) ResetUserPassword

func (t *AuthTable) ResetUserPassword(userName string) helpers.Error

ResetPassword

func (*AuthTable) SetAltLoginItem

func (t *AuthTable) SetAltLoginItem(item string) int

SetAltLoginItem sets the AuthTable's alternative login item. Item must be a string and unique.

func (*AuthTable) SetEmailItem

func (t *AuthTable) SetEmailItem(item string) int

SetAltLoginItem sets the AuthTable's email item. Item must be a string and unique.

func (*AuthTable) SetEmailSettings

func (t *AuthTable) SetEmailSettings(settings EmailSettings) int

SetVerifyItem sets the AuthTable's email verification item. Item must be a string.

func (*AuthTable) SetEncryptionCost

func (t *AuthTable) SetEncryptionCost(cost int) int

func (*AuthTable) SetMaxEntries

func (t *AuthTable) SetMaxEntries(max uint64) int

func (*AuthTable) SetMinPasswordLength

func (t *AuthTable) SetMinPasswordLength(min uint8) int

func (*AuthTable) SetPartitionMax

func (t *AuthTable) SetPartitionMax(max uint16) int

func (*AuthTable) SetPasswordResetLength

func (t *AuthTable) SetPasswordResetLength(len uint8) int

func (*AuthTable) SetVerifyItem

func (t *AuthTable) SetVerifyItem(item string) int

SetVerifyItem sets the AuthTable's email verification item. Item must be a string.

func (*AuthTable) Size

func (t *AuthTable) Size() int

func (*AuthTable) UpdateUser

func (t *AuthTable) UpdateUser(userName string, password string, updateObj map[string]interface{}) helpers.Error

UpdateUserData

type EmailSettings

type EmailSettings struct {
	AuthType string // "CRAMMD5" or "Plain"
	AuthName string // username
	AuthPass string // password
	AuthID   string // identity (for Plain)
	AuthHost string // host (for Plain)

	VerifyFrom string // Verification email sender
	VerifySubj string // Verification email subject
	VerifyBody string // Verification email body
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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