globalinfos

package
v0.0.0-...-4780336 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COLLECTION_NAME_TEMPTOKENS = "temp-tokens"
)

collection names

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalInfosDBService

type GlobalInfosDBService struct {
	DBClient *mongo.Client

	DBNamePrefix string
	InstanceIDs  []string
	// contains filtered or unexported fields
}

func NewGlobalInfosDBService

func NewGlobalInfosDBService(configs db.DBConfig) (*GlobalInfosDBService, error)

func (*GlobalInfosDBService) AddTempToken

func (dbService *GlobalInfosDBService) AddTempToken(t userTypes.TempToken) (token string, err error)

func (*GlobalInfosDBService) CreateIndexForTemptokens

func (dbService *GlobalInfosDBService) CreateIndexForTemptokens() error

func (*GlobalInfosDBService) DeleteAllTempTokenForUser

func (dbService *GlobalInfosDBService) DeleteAllTempTokenForUser(instanceID string, userID string, purpose string) error

func (*GlobalInfosDBService) DeleteTempToken

func (dbService *GlobalInfosDBService) DeleteTempToken(token string) error

func (*GlobalInfosDBService) GetTempToken

func (dbService *GlobalInfosDBService) GetTempToken(token string) (userTypes.TempToken, error)

func (*GlobalInfosDBService) UpdateTempTokenExpirationTime

func (dbService *GlobalInfosDBService) UpdateTempTokenExpirationTime(token string, newExpiration time.Time) error

Jump to

Keyboard shortcuts

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