file

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConcExports = errors.New("too many concurrent exports. Wait for old export succeeded, and try again")

Functions

This section is empty.

Types

type Model

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

func NewModel

func NewModel(db *m.Database) Model

func (Model) EnsureLimitAndCreatePending

func (m Model) EnsureLimitAndCreatePending(ctx context.Context, userID, eventID primitive.ObjectID, name string) (err error)

func (Model) Get

func (m Model) Get(
	ctx context.Context,
	userID primitive.ObjectID,
	skip,
	limit uint32,
) (
	res []file,
	err error,
)

func (Model) GetFromCompanyID

func (m Model) GetFromCompanyID(ctx context.Context, eventID primitive.ObjectID) (companyID string, err error)

func (Model) GetMasterJob

func (m Model) GetMasterJob(
	ctx context.Context,
	query *parser.GetV2Request,
	selfEventID primitive.ObjectID,
) (
	eventID primitive.ObjectID,
	err error,
)

func (Model) IncCurrentCount

func (m Model) IncCurrentCount(ctx context.Context, eventID primitive.ObjectID, currentCount uint32) (err error)

func (Model) SetFail

func (m Model) SetFail(ctx context.Context, eventID primitive.ObjectID) (err error)

func (Model) SetFromCompanyID

func (m Model) SetFromCompanyID(ctx context.Context, eventID primitive.ObjectID, companyID string) (err error)

func (Model) SetMasterJobInProgress

func (m Model) SetMasterJobInProgress(
	ctx context.Context,
	eventID primitive.ObjectID,
	query *parser.GetV2Request,
	totalCount uint32,
) (
	err error,
)

func (Model) SetSuccess

func (m Model) SetSuccess(ctx context.Context, eventID primitive.ObjectID, url string) (err error)

func (Model) WatchJob

func (m Model) WatchJob(
	ctx context.Context,
	masterEventID primitive.ObjectID,
	slaveEventID primitive.ObjectID,
) (
	err error,
)

Jump to

Keyboard shortcuts

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