models

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled bool           `json:"enabled" bson:"enabled"`
	Quota   Quota          `json:"quota,omitempty" bson:"quota,omitempty"`
	Rate    int            `json:"rate,omitempty" bson:"rate,omitempty"`
	Log     map[string]int `json:"log,omitempty" bson:"log,omitempty"`
}

Config Struct

type IntervalType

type IntervalType string

IntervalType : Type of interval

const (
	DayType   IntervalType = "day"
	MonthType IntervalType = "month"
)

Day Month

type Quota

type Quota struct {
	Number   int          `json:"max_number,omitempty" bson:"max_number,omitempty"`
	Interval IntervalType `json:"interval_type,omitempty" bson:"interval_type,omitempty"`
}

Quota Struct

Jump to

Keyboard shortcuts

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