github.com/go-chef/chef@v0.30.1/required_recipe.go (about)

     1  package chef
     2  
     3  type RequiredRecipeService struct {
     4  	client *Client
     5  }
     6  
     7  // RequireRecipe the text of the required recipe.
     8  type RequiredRecipe string
     9  
    10  // RequiredRecipe gets the optional required_runlist value.
    11  //
    12  // https://docs.chef.io/api_chef_server/
    13  // 200 - required_recipe enabled = true && required_recipe path specified, returns the recipe
    14  // 404   required_recipe enabled = false
    15  func (e *RequiredRecipeService) Get() (data RequiredRecipe, err error) {
    16  	var getdata string
    17  	err = e.client.magicRequestDecoder("GET", "required_recipe", nil, &getdata)
    18  	data = RequiredRecipe(getdata)
    19  	return
    20  }