Documentation
¶
Overview ¶
Package role provides roles, which are a way to share common attributes and run lists between different nodes.
Index ¶
- func DoesExist(roleName string) (bool, util.Gerror)
- func GetList() []string
- type Role
- func (r *Role) Delete() error
- func (r *Role) DocID() string
- func (r *Role) Flatten() map[string]interface{}
- func (r *Role) GetName() string
- func (r *Role) Index() string
- func (r *Role) Save() error
- func (r *Role) URLType() string
- func (r *Role) UpdateFromJSON(jsonRole map[string]interface{}) util.Gerror
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Role ¶
type Role struct {
Name string `json:"name"`
ChefType string `json:"chef_type"`
JSONClass string `json:"json_class"`
RunList []string `json:"run_list"`
EnvRunLists map[string][]string `json:"env_run_lists"`
Description string `json:"description"`
Default map[string]interface{} `json:"default_attributes"`
Override map[string]interface{} `json:"override_attributes"`
}
Role is a way to specify shared run lists and attributes for nodes.
func AllRoles ¶ added in v0.5.2
func AllRoles() []*Role
AllRoles returns all the roles on the server
func NewFromJSON ¶ added in v0.6.0
NewFromJSON creates a new role from the uploaded JSON.
Click to show internal directories.
Click to hide internal directories.