mongo

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RequestTable is a name for requests
	RequestTable = "requests"

	// EmailTable is name for email lock table
	EmailTable = "emailLock"
)

Variables

This section is empty.

Functions

func GetIndexes

func GetIndexes() []mng.IndexData

GetIndexes returns indexes for mongo tables

func Tables

func Tables() []string

Tables returns tables for system

Types

type Request

type Request struct {
	SessionProvider *mng.SessionProvider
	// contains filtered or unexported fields
}

Request provides request persistence

func NewRequest

func NewRequest(sessionProvider *mng.SessionProvider) (*Request, error)

NewRequest creates Request instance

func (*Request) GetEmail

func (rm *Request) GetEmail(id string) (string, error)

GetEmail returns email by ID

func (*Request) GetResultFile

func (rm *Request) GetResultFile(id string) (string, error)

GetResultFile returns file name by ID

func (*Request) Save

func (rm *Request) Save(data *persistence.ReqData) error

Save saves resquest to DB

type Status

type Status struct {
	SessionProvider *mng.SessionProvider
}

Status saves process status to mongo db

func NewStatus

func NewStatus(sessionProvider *mng.SessionProvider) (*Status, error)

NewStatus creates Status instance

func (*Status) Get

func (ss *Status) Get(id string) (*persistence.Status, error)

Get retrieves status from DB

func (*Status) Save

func (ss *Status) Save(ID string, st, errStr string) error

Save saves status to DB

Jump to

Keyboard shortcuts

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