Documentation ¶
Index ¶
- Constants
- Variables
- func AddResource(fileName string, gossConfig GossConfig, resourceName, key string, ...) error
- func AddResources(fileName, resourceName string, keys []string, c *cli.Context) error
- func AutoAddResource(fileName string, gossConfig GossConfig, key string, c *cli.Context, ...) error
- func AutoAddResources(fileName string, keys []string, c *cli.Context) error
- func NewTemplateFilter(varsFile string) func([]byte) []byte
- func RenderJSON(c *cli.Context) string
- func Serve(c *cli.Context)
- func Validate(c *cli.Context, startTime time.Time)
- func WriteJSON(filePath string, gossConfig GossConfig) error
- type GossConfig
- type TmplVars
Constants ¶
View Source
const ( UNSET = iota JSON YAML )
Variables ¶
View Source
var OutStoreFormat = UNSET
View Source
var TemplateFilter func(data []byte) []byte
Functions ¶
func AddResource ¶ added in v0.1.0
func AddResources ¶ added in v0.1.10
Simple wrapper to add multiple resources
func AutoAddResource ¶ added in v0.1.0
func AutoAddResources ¶ added in v0.1.10
Simple wrapper to add multiple resources
func NewTemplateFilter ¶ added in v0.3.0
func RenderJSON ¶
Reads json file recursively returning string
func WriteJSON ¶
func WriteJSON(filePath string, gossConfig GossConfig) error
Types ¶
type GossConfig ¶ added in v0.1.0
type GossConfig struct { Files resource.FileMap `json:"file,omitempty" yaml:"file,omitempty"` Packages resource.PackageMap `json:"package,omitempty" yaml:"package,omitempty"` Addrs resource.AddrMap `json:"addr,omitempty" yaml:"addr,omitempty"` Ports resource.PortMap `json:"port,omitempty" yaml:"port,omitempty"` Services resource.ServiceMap `json:"service,omitempty" yaml:"service,omitempty"` Users resource.UserMap `json:"user,omitempty" yaml:"user,omitempty"` Groups resource.GroupMap `json:"group,omitempty" yaml:"group,omitempty"` Commands resource.CommandMap `json:"command,omitempty" yaml:"command,omitempty"` DNS resource.DNSMap `json:"dns,omitempty" yaml:"dns,omitempty"` Processes resource.ProcessMap `json:"process,omitempty" yaml:"process,omitempty"` Gossfiles resource.GossfileMap `json:"gossfile,omitempty" yaml:"gossfile,omitempty"` KernelParams resource.KernelParamMap `json:"kernel-param,omitempty" yaml:"kernel-param,omitempty"` Mounts resource.MountMap `json:"mount,omitempty" yaml:"mount,omitempty"` Interfaces resource.InterfaceMap `json:"interface,omitempty" yaml:"interface,omitempty"` HTTPs resource.HTTPMap `json:"http,omitempty" yaml:"http,omitempty"` Matchings resource.MatchingMap `json:"matching,omitempty" yaml:"matching,omitempty"` }
func NewGossConfig ¶ added in v0.1.0
func NewGossConfig() *GossConfig
func ReadJSONData ¶
func ReadJSONData(data []byte, detectFormat bool) GossConfig
Reads json byte array returning GossConfig
func (*GossConfig) Resources ¶ added in v0.1.0
func (c *GossConfig) Resources() []resource.Resource
Source Files ¶
Click to show internal directories.
Click to hide internal directories.