config

package
v0.0.0-...-1a96828 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	API_NodeInfo       = "/node/info"
	API_NodeStatus     = "/node/status"
	API_NodeLog        = "/node/log"
	API_NodePrune      = "/node/prune"
	API_NodeApps       = "/node/apps"
	API_NodeAppInfo    = "/node/app/info"
	API_NodeAppVersion = "/node/app/version"
	API_NodeAppReset   = "/node/app/version"

	API_NodesInfo   = "/nodes/info"
	API_NodesStatus = "/nodes/status"
	API_NodesParse  = "/nodes/parse"

	API_ScenarioInfo      = "/scenario/info"
	API_ScenarioUpdate    = "/scenario/update"
	API_ScenarioVersion   = "/scenario/version"
	API_ScenarioFix       = "/scenario/fix"
	API_ScenarioAppDeploy = "/scenario/app/deployment"
	API_ScenarioAppCreate = "/scenario/app/prepare"
	API_ScenarioAppCommit = "/scenario/app/commit"

	API_ScenariosInfo = "/scenarios/info"

	API_FileUpload  = "/file/upload"
	API_FileSpread  = "/file/spread"
	API_FileDistrib = "/file/distrib"
	API_FileTree    = "/file/tree"
	API_FilePull    = "/file/pull"

	API_RunCmd    = "/run/cmd"
	API_RunScript = "/run/script"
	API_RunCancel = "/run/cancel"

	API_Ssh = "/ssh"

	API_TaskState = "/taskstate"

	API_Pakma = "/pakma"

	API_Group  = "/group"
	API_Groups = "/groups"

	API_WorkgroupInfo     = "/workgroup/info"
	API_WorkgroupMembers  = "/workgroup/members"
	API_WorkgroupChildren = "/workgroup/children"
)

Variables

View Source
var BrainAddr string

Functions

func InitConfig

func InitConfig(conf string) *errs.OctlError

Types

type BrainModel

type BrainModel struct {
	Name      string `mapstructure:"name"`
	Ip        string `mapstructure:"ip"`
	Port      uint16 `mapstructure:"port"`
	ApiPrefix string `mapstructure:"apiPrefix"`
}

type ConfigModel

type ConfigModel struct {
	HttpsNameServer HttpsNsModel   `mapstructure:"httpsNameServer"`
	Brain           BrainModel     `mapstructure:"brain"`
	Sslinfo         SslinfoModel   `mapstructure:"ssl"`
	Gitinfo         GitinfoModel   `mapstructure:"git"`
	OutputPretty    bool           `mapstructure:"outputPretty"`
	JsonFast        bool           `mapstructure:"jsonFast"`
	Workgroup       WorkgroupModel `mapstructure:"workgroup"`
}
var GlobalConfig ConfigModel

type GitinfoModel

type GitinfoModel struct {
	ServeUrl string `mapstructure:"serveUrl"`
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
}

type HttpsNsModel

type HttpsNsModel struct {
	Enabled         bool   `mapstructure:"enable"`
	Host            string `mapstructure:"host"`
	Port            uint16 `mapstructure:"port"`
	RequestInterval int    `mapstructure:"requestInterval"`
}

type JSONER

type JSONER interface {
	Marshal(v any) ([]byte, error)
	Unmarshal(data []byte, v any) error
}
var Jsoner JSONER

type SslinfoModel

type SslinfoModel struct {
	CaCert     string `mapstructure:"caCert"`
	ClientCert string `mapstructure:"clientCert"`
	ClientKey  string `mapstructure:"clientKey"`
}

type StdJsoner

type StdJsoner struct{}

func (StdJsoner) Marshal

func (StdJsoner) Marshal(v any) ([]byte, error)

func (StdJsoner) Unmarshal

func (StdJsoner) Unmarshal(data []byte, v any) error

type WorkgroupModel

type WorkgroupModel struct {
	Root            string `mapstructure:"root"`
	Password        string `mapstructure:"password"`
	CurrentPathFile string `mapstructure:"currentPathFile"`
}

Jump to

Keyboard shortcuts

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