role

package
v0.5.0-pre1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2014 License: Apache-2.0 Imports: 8 Imported by: 22

Documentation

Overview

Package role provides roles, which are a way to share common attributes and run lists between different nodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetList

func GetList() []string

Get a list of the roles on this server.

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"`
}

func Get

func Get(role_name string) (*Role, error)

func New

func New(name string) (*Role, util.Gerror)

func NewFromJson

func NewFromJson(json_role map[string]interface{}) (*Role, util.Gerror)

Create a new role from the uploaded JSON.

func (*Role) Delete

func (r *Role) Delete() error

func (*Role) DocId

func (r *Role) DocId() string

func (*Role) Flatten

func (r *Role) Flatten() []string

func (*Role) GetName

func (r *Role) GetName() string

func (*Role) Index

func (r *Role) Index() string

func (*Role) Save

func (r *Role) Save() error

func (*Role) URLType

func (r *Role) URLType() string

func (*Role) UpdateFromJson

func (r *Role) UpdateFromJson(json_role map[string]interface{}) util.Gerror

Update an existing role with the uploaded JSON.

Jump to

Keyboard shortcuts

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