Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigSaveLocation = "courier/config.json"
ConfigSaveLocation the location to save the config to.
View Source
var DefaultConfig = Config{ Data: Data{}, Repo: "gogs@git.cory.red:DankBotList/Site.git", Ref: "refs/heads/master", PollTimeSeconds: 20, WebSocketPath: "/courier/ws", AuthenticationKey: uuid.Must(uuid.NewV4()).String() + "-" + uuid.Must(uuid.NewV4()).String(), DataFolder: "courier/data/", }
DefaultConfig the default configuration to save.
View Source
var DefaultConfigSavedError = errors.New("the default config has been saved, please edit it")
DefaultConfigSavedError an error returned if the default config is saved.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Data `json:"-"`
Repo string `json:"repo"`
Ref string `json:"ref"`
PollTimeSeconds int `json:"poll_time_seconds"`
WebSocketPath string `json:"web_socket_path"`
AuthenticationKey string `json:"authentication_key"`
DataFolder string `json:"data_folder"`
}
Config the main configuration.
type Data ¶
type Data struct{}
Data an abstract struct used for it's functions to save and load config files.
type HostsData ¶
HostsData the data for hosts, their locations and ID's.
func (*HostsData) SetDataFile ¶
type Instance ¶
type Instance struct {
InstanceID string
// contains filtered or unexported fields
}
Instance an instance of a courier, locked by a file.
func (*Instance) SetInstanceID ¶
SetInstanceID sets the instance id to be used when communicating
Click to show internal directories.
Click to hide internal directories.