accountlimit

package
v0.3.20 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const CName = "coordinator.accountLimit"

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountLimit

type AccountLimit interface {
	SetLimits(ctx context.Context, limits Limits) (err error)
	GetLimits(ctx context.Context, identity string) (limits Limits, err error)
	GetLimitsBySpace(ctx context.Context, spaceId string) (limits SpaceLimits, err error)
	app.Component
}

func New

func New() AccountLimit

type Limits

type Limits struct {
	Identity          string    `bson:"_id"`
	Reason            string    `bson:"reason"`
	FileStorageBytes  uint64    `bson:"fileStorageBytes"`
	SpaceMembersRead  uint32    `bson:"spaceMembersRead"`
	SpaceMembersWrite uint32    `bson:"spaceMembersWrite"`
	SharedSpacesLimit uint32    `bson:"sharedSpacesLimit"`
	UpdatedTime       time.Time `bson:"updatedTime"`
}

type SpaceLimits

type SpaceLimits struct {
	SpaceMembersRead  uint32 `yaml:"spaceMembersRead" bson:"spaceMembersRead"`
	SpaceMembersWrite uint32 `yaml:"spaceMembersWrite" bson:"spaceMembersWrite"`
	SharedSpacesLimit uint32 `yaml:"sharedSpacesLimit" bson:"sharedSpacesLimit"`
}

Directories

Path Synopsis
Package mock_accountlimit is a generated GoMock package.
Package mock_accountlimit is a generated GoMock package.

Jump to

Keyboard shortcuts

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