Documentation
¶
Index ¶
- type Building
- func (d *Building) GetCity() string
- func (d *Building) GetCountry() string
- func (d *Building) GetId() string
- func (d *Building) GetName() string
- func (d *Building) GetStateProvince() string
- func (d *Building) GetStreetAddress1() string
- func (d *Building) GetStreetAddress2() string
- func (d *Building) GetZipPostalCode() string
- func (d *Building) SetCity(v string)
- func (d *Building) SetCountry(v string)
- func (d *Building) SetId(v string)
- func (d *Building) SetName(v string)
- func (d *Building) SetStateProvince(v string)
- func (d *Building) SetStreetAddress1(v string)
- func (d *Building) SetStreetAddress2(v string)
- func (d *Building) SetZipPostalCode(v string)
- type Category
- type Client
- func (c *Client) CreateBuilding(name, sa1, sa2, city, sp, zpc, country *string) (*Building, error)
- func (c *Client) CreateCategory(name *string, priority *int) (*Category, error)
- func (c *Client) CreateDepartment(name *string) (*Department, error)
- func (c *Client) DeleteBuilding(name string) error
- func (c *Client) DeleteCategory(name string) error
- func (c *Client) DeleteDepartment(name string) error
- func (c *Client) GetBuilding(id string) (data *Building, err error)
- func (c *Client) GetBuildingByName(name string) (data *Building, err error)
- func (c *Client) GetBuildingIdByName(name string) (string, error)
- func (c *Client) GetBuildings() (data *ResponseBuildings, err error)
- func (c *Client) GetCategories() (data *ResponseCategories, err error)
- func (c *Client) GetCategory(id string) (data *Category, err error)
- func (c *Client) GetCategoryByName(name string) (data *Category, err error)
- func (c *Client) GetCategoryIdByName(name string) (string, error)
- func (c *Client) GetDepartment(id string) (data *Department, err error)
- func (c *Client) GetDepartmentByName(name string) (data *Department, err error)
- func (c *Client) GetDepartmentIdByName(name string) (string, error)
- func (c *Client) GetDepartments() (data *ResponseDepartments, err error)
- func (c *Client) UpdateBuilding(d *Building) (*Building, error)
- func (c *Client) UpdateCategory(d *Category) (*Category, error)
- func (c *Client) UpdateDepartment(d *Department) (*Department, error)
- type Department
- type ResponseAuthToken
- type ResponseBuildings
- type ResponseCategories
- type ResponseDepartments
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Building ¶
type Building struct { Id *string `json:"id,omitempty"` // The response type to be returned is a string Name *string `json:"name,omitempty"` StreetAddress1 *string `json:"streetAddress1,omitempty"` StreetAddress2 *string `json:"streetAddress2,omitempty"` City *string `json:"city,omitempty"` StateProvince *string `json:"stateProvince,omitempty"` ZipPostalCode *string `json:"zipPostalCode,omitempty"` Country *string `json:"country,omitempty"` Href *string `json:"href,omitempty"` }
func (*Building) GetCountry ¶
func (*Building) GetStateProvince ¶
func (*Building) GetStreetAddress1 ¶
func (*Building) GetStreetAddress2 ¶
func (*Building) GetZipPostalCode ¶
func (*Building) SetCountry ¶
func (*Building) SetStateProvince ¶
func (*Building) SetStreetAddress1 ¶
func (*Building) SetStreetAddress2 ¶
func (*Building) SetZipPostalCode ¶
type Category ¶
type Category struct { Id *string `json:"id,omitempty"` // The response type to be returned is a string Name *string `json:"name,omitempty"` Priority *int `json:"priority,omitempty"` Href *string `json:"href,omitempty"` }
func (*Category) GetPriority ¶
func (*Category) SetPriority ¶
type Client ¶
type Client struct { // The Http Client that is used to make requests HttpClient *http.Client HttpRetryTimeout time.Duration // Option to specify extra headers like User-Agent ExtraHeader map[string]string // contains filtered or unexported fields }
Client ... stores an object to talk with Jamf API
func (*Client) CreateBuilding ¶
func (*Client) CreateCategory ¶
func (*Client) CreateDepartment ¶
func (c *Client) CreateDepartment(name *string) (*Department, error)
func (*Client) DeleteBuilding ¶
func (*Client) DeleteCategory ¶
func (*Client) DeleteDepartment ¶
func (*Client) GetBuildingByName ¶
func (*Client) GetBuildingIdByName ¶
func (*Client) GetBuildings ¶
func (c *Client) GetBuildings() (data *ResponseBuildings, err error)
func (*Client) GetCategories ¶
func (c *Client) GetCategories() (data *ResponseCategories, err error)
func (*Client) GetCategoryByName ¶
func (*Client) GetCategoryIdByName ¶
func (*Client) GetDepartment ¶
func (c *Client) GetDepartment(id string) (data *Department, err error)
func (*Client) GetDepartmentByName ¶
func (c *Client) GetDepartmentByName(name string) (data *Department, err error)
func (*Client) GetDepartmentIdByName ¶
func (*Client) GetDepartments ¶
func (c *Client) GetDepartments() (data *ResponseDepartments, err error)
func (*Client) UpdateDepartment ¶
func (c *Client) UpdateDepartment(d *Department) (*Department, error)
type Department ¶
type Department struct { Id *string `json:"id,omitempty"` // The response type to be returned is a string Name *string `json:"name,omitempty"` Href *string `json:"href,omitempty"` }
func (*Department) GetId ¶
func (d *Department) GetId() string
func (*Department) GetName ¶
func (d *Department) GetName() string
func (*Department) SetName ¶
func (d *Department) SetName(v string)
type ResponseAuthToken ¶
type ResponseBuildings ¶
type ResponseCategories ¶
type ResponseDepartments ¶
type ResponseDepartments struct { TotalCount *int `json:"totalCount,omitempty"` Results []Department `json:"results,omitempty"` }
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
In curl: curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" "$jssurl/uapi/v1/departments" -d "{\"name\": \"hoge\"}"
|
In curl: curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" "$jssurl/uapi/v1/departments" -d "{\"name\": \"hoge\"}" |
Click to show internal directories.
Click to hide internal directories.