Documentation
¶
Overview ¶
Package models provides the object models for haul requests and responses
Index ¶
Constants ¶
View Source
const Schema = `` /* 783-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct {
ID int64 `db:"id, omitempty" json:"id"`
Description string `db:"description" json:"description"`
Status string `db:"status" json:"status"`
Target int64 `db:"target" json:"target"`
CreatedAt *time.Time `db:"created_at" json:"created_at"`
DeletedAt *time.Time `db:"deleted_at, omitempty" json:"deleted_at"`
}
type AssetAttribute ¶ added in v0.33.0
type AssetWithAttributes ¶ added in v0.46.0
type ClientConfig ¶
type ClientConfig struct {
Cli struct {
Style string
}
Api struct {
Host string
Key string
PageSize int `mapstructure:"page_size"`
Page int
Protocol string
Port int
}
}
Struct ClientConfig holds config options needed by a client. Example uses are:
- Cli output style
- Remote (or local) API connection informations
type Config ¶
type Config struct {
// Client configuration
Client ClientConfig
// Server configuration
Server ServerConfig
}
Struct Config is used as the primary target for viper.Unmarshal() in haul
It tries to contain all possible configuration options, and will apply the proper defaults set by cobra.
Config options are split between Config.Server and Config.Client.
type ServerConfig ¶
type ServerConfig struct {
Api struct {
Key string
Port int
TLS struct {
Enabled bool
Cert string
Key string
}
}
Postgres struct {
Database string
Host string
Password string
Port int
User string
SSLEnabled bool `mapstructure:"ssl_enabled"`
}
}
Struct ServerConfig holds config options needed by a server. Examples uses are:
- API server configurations for hosting
- Database connection informations
type TabbyPrinter ¶
type TabbyPrinter interface {
TabbyPrint() error
}
Click to show internal directories.
Click to hide internal directories.