Documentation
¶
Index ¶
- Constants
- func BoltFile() (string, error)
- func Fail(c *gin.Context)
- func FailWithDetailed(data interface{}, message string, c *gin.Context)
- func FailWithMessage(message string, c *gin.Context)
- func InfluxDir() (string, error)
- func Ok(c *gin.Context)
- func OkWithData(data interface{}, c *gin.Context)
- func OkWithDetailed(data interface{}, message string, c *gin.Context)
- func OkWithMessage(message string, c *gin.Context)
- func Result(code int, data interface{}, msg string, c *gin.Context)
- type AnalyticalStorage
- type CodesReq
- type Empty
- type GetAuthorityId
- type GetById
- type IdsReq
- type InfluxdOpts
- type Launcher
- type PageInfo
- type Response
- type ResponseInfo
Constants ¶
View Source
const ( // DiskStore stores all REST resources to disk in boltdb and sqlite. DiskStore = "disk" // BoltStore also stores all REST resources to disk in boltdb and sqlite. Kept for backwards-compatibility. BoltStore = "bolt" // MemoryStore stores all REST resources in memory (useful for testing). MemoryStore = "memory" // LogTracing enables tracing via zap logs LogTracing = "log" // JaegerTracing enables tracing via the Jaeger client library JaegerTracing = "jaeger" )
View Source
const ( ERROR = 7 SUCCESS = 0 )
View Source
const DefaultConfigsFile = "configs"
DefaultConfigsFile stores cli credentials and hosts.
View Source
const DefaultTokenFile = "credentials"
DefaultTokenFile is deprecated, and will be only used for migration.
Variables ¶
This section is empty.
Functions ¶
func FailWithDetailed ¶
func FailWithMessage ¶
func OkWithData ¶
func OkWithDetailed ¶
func OkWithMessage ¶
Types ¶
type AnalyticalStorage ¶
type AnalyticalStorage struct { taskmodel.TaskService Kvstore *kv.Service // contains filtered or unexported fields }
func NewAnalyticalStorage ¶
func NewAnalyticalStorage(log *zap.Logger, ts taskmodel.TaskService) *AnalyticalStorage
NewAnalyticalStorage creates a new analytical store with access to the necessary systems for storing data and to act as a middleware (deprecated)
type GetAuthorityId ¶
type GetAuthorityId struct {
AuthorityId uint `json:"authorityId" form:"authorityId"` // 角色ID
}
GetAuthorityId Get role by id structure
type InfluxdOpts ¶
type InfluxdOpts struct { AssetsPath string BoltPath string SqLitePath string EnginePath string TracingType string StoreType string SecretStore string VaultConfig vault.Config // Storage options. StorageConfig storage.Config Viper *viper.Viper HardeningEnabled bool HttpBindAddress string HttpReadHeaderTimeout time.Duration HttpReadTimeout time.Duration HttpWriteTimeout time.Duration HttpIdleTimeout time.Duration }
InfluxdOpts captures all arguments for running the InfluxDB server.
type Launcher ¶
type Launcher struct { KvService *kv.Service Executor *executor.Executor TSC taskmodel.TaskService Exbot *bot.Exbot // contains filtered or unexported fields }
Launcher represents the main program execution.
func NewLauncher ¶
func NewLauncher() *Launcher
NewLauncher returns a new instance of Launcher with a no-op logger.
type PageInfo ¶
type PageInfo struct { Page int `json:"page" form:"page"` // 页码 PageSize int `json:"pageSize" form:"pageSize"` // 每页大小 Keyword string `json:"keyword" form:"keyword"` //关键字 }
PageInfo Paging common input parameter structure
type ResponseInfo ¶
type ResponseInfo struct { List interface{} `json:"list"` Total int `json:"total" form:"total"` // 页码 }
Click to show internal directories.
Click to hide internal directories.