model

package
v0.0.0-...-8eff3c5 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonResult

type CommonResult struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type Configuration

type Configuration struct {
	LogConfig LogConfig
	Port      string `default:"9092"`
	Channel   string
	Key       string
}

type LogConfig

type LogConfig struct {
	Folder   string `default:"./logs/"`
	Filename string `default:"app.log"`
	Level    string `default:"info"`

	// MaxSize is the maximum size in megabytes of the log file before it gets
	// rotated. It defaults to 100 megabytes.
	MaxSize int `json:"maxsize" yaml:"maxsize"`

	// MaxAge is the maximum number of days to retain old log files based on the
	// timestamp encoded in their filename.  Note that a day is defined as 24
	// hours and may not exactly correspond to calendar days due to daylight
	// savings, leap seconds, etc. The default is not to remove old log files
	// based on age.
	MaxAge int `json:"maxage" yaml:"maxage"`

	// MaxBackups is the maximum number of old log files to retain.  The default
	// is to retain all old log files (though MaxAge may still cause them to get
	// deleted.)
	MaxBackups int `json:"maxbackups" yaml:"maxbackups"`

	// LocalTime determines if the time used for formatting the timestamps in
	// backup files is the computer's local time.  The default is to use UTC
	// time.
	LocalTime bool `json:"localtime" yaml:"localtime"`

	// Compress determines if the rotated log files should be compressed
	// using gzip. The default is not to perform compression.
	Compress bool `json:"compress" yaml:"compress"`
}

type PushMessage

type PushMessage struct {
	Key         string
	PushChannel string
	Params      map[string]string
	Content     string
}

type PushRequest

type PushRequest struct {
	Key          string            `json:"key"`
	PushChannel  string            `json:"pushChannel"`
	Params       map[string]string `json:"params"`
	TemplateCode string            `json:"templateCode"`
	TemplateType string            `json:"templateType"`
	Mentions     []string          `json:"mentions"`
	Content      string            `json:"content"`
}

Jump to

Keyboard shortcuts

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