Documentation ¶
Overview ¶
Package data_bag provides a convenient way to store arbitrary data on the server.
Index ¶
- func GetList() []string
- func RawDataBagJson(data io.ReadCloser) map[string]interface{}
- type DataBag
- func (db *DataBag) AllDBItems() (map[string]*DataBagItem, error)
- func (db *DataBag) Delete() error
- func (db *DataBag) DeleteDBItem(db_item_name string) error
- func (db *DataBag) GetDBItem(db_item_name string) (*DataBagItem, error)
- func (db *DataBag) GetName() string
- func (db *DataBag) ListDBItems() []string
- func (db *DataBag) NewDBItem(raw_dbag_item map[string]interface{}) (*DataBagItem, util.Gerror)
- func (db *DataBag) NumDBItems() int
- func (db *DataBag) Save() error
- func (db *DataBag) URLType() string
- func (db *DataBag) UpdateDBItem(dbi_id string, raw_dbag_item map[string]interface{}) (*DataBagItem, error)
- type DataBagItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RawDataBagJson ¶
func RawDataBagJson(data io.ReadCloser) map[string]interface{}
Extract the data bag item's raw data from the request saving it to the server.
Types ¶
type DataBag ¶
type DataBag struct { Name string DataBagItems map[string]*DataBagItem // contains filtered or unexported fields }
The overall data bag.
func (*DataBag) AllDBItems ¶ added in v0.5.0
func (db *DataBag) AllDBItems() (map[string]*DataBagItem, error)
func (*DataBag) DeleteDBItem ¶
func (*DataBag) GetDBItem ¶ added in v0.5.0
func (db *DataBag) GetDBItem(db_item_name string) (*DataBagItem, error)
func (*DataBag) ListDBItems ¶ added in v0.5.0
func (*DataBag) NewDBItem ¶
func (db *DataBag) NewDBItem(raw_dbag_item map[string]interface{}) (*DataBagItem, util.Gerror)
Create a new data bag item in the associated data bag.
func (*DataBag) NumDBItems ¶ added in v0.5.0
func (*DataBag) UpdateDBItem ¶
func (db *DataBag) UpdateDBItem(dbi_id string, raw_dbag_item map[string]interface{}) (*DataBagItem, error)
Updates a data bag item in this data bag.
type DataBagItem ¶
type DataBagItem struct { Name string `json:"name"` ChefType string `json:"chef_type"` JsonClass string `json:"json_class"` DataBagName string `json:"data_bag"` RawData map[string]interface{} `json:"raw_data"` // contains filtered or unexported fields }
An item within a data bag.
func (*DataBagItem) DocId ¶
func (dbi *DataBagItem) DocId() string
Indexing functions for data bag items
func (*DataBagItem) Flatten ¶
func (dbi *DataBagItem) Flatten() []string
func (*DataBagItem) GetName ¶ added in v0.5.1
func (db *DataBagItem) GetName() string
func (*DataBagItem) Index ¶
func (dbi *DataBagItem) Index() string
func (*DataBagItem) URLType ¶ added in v0.5.1
func (db *DataBagItem) URLType() string
Click to show internal directories.
Click to hide internal directories.