Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractDomainsInto ¶
func ExtractDomainsInto(r pagination.Page, v interface{}) error
func List ¶
func List(c *gophercloud.ServiceClient) pagination.Pager
List returns a Pager which allows you to iterate over a collection of domains.
Types ¶
type CostObject ¶
type CostObject struct { // Set to true, if the costobject should be inheritable for subprojects ProjectsCanInherit bool `json:"projects_can_inherit"` // Name of the costobject Name string `json:"name,omitempty"` // Costobject-Type Type of the costobject // IO, CC, WBS, SO Type string `json:"type,omitempty"` }
The cost object structure
type Domain ¶
type Domain struct { // Instance ID IID int `json:"iid"` // ID of the domain DomainID string `json:"domain_id"` // Name of the domain DomainName string `json:"domain_name"` // Description of the domain Description string `json:"description"` // SAP-User-Id of primary contact for the domain ResponsiblePrimaryContactID string `json:"responsible_primary_contact_id"` // Email-address of primary contact for the domain ResponsiblePrimaryContactEmail string `json:"responsible_primary_contact_email"` // SAP-User-Id of the controller who is responsible for the domain / the costobject ResponsibleControllerID string `json:"responsible_controller_id"` // Email-address or DL of the person/group who is controlling the domain / the costobject ResponsibleControllerEmail string `json:"responsible_controller_email"` // Freetext field for additional information for domain AdditionalInformation string `json:"additional_information"` // The cost object structure CostObject CostObject `json:"cost_object"` // The date, when the domain was created. CreatedAt time.Time `json:"-"` // The date, when the domain was updated. ChangedAt time.Time `json:"-"` // The ID of the user, who did the last change. ChangedBy string `json:"changed_by"` // Only contained in Server response: True, if the given masterdata are complete; Otherwise false IsComplete bool `json:"is_complete"` // Only contained in Server response: Human readable text, showing, what information are missing MissingAttributes string `json:"missing_attributes"` // Collector of the domain Collector string `json:"collector"` // Region of the domain Region string `json:"region"` }
Domain represents a Billing Domain.
func ExtractDomains ¶
func ExtractDomains(r pagination.Page) ([]Domain, error)
ExtractDomains accepts a Page struct, specifically a DomainPage struct, and extracts the elements into a slice of Domain structs. In other words, a generic collection is mapped into a relevant slice.
func (*Domain) MarshalJSON ¶
func (*Domain) UnmarshalJSON ¶
type DomainPage ¶
type DomainPage struct {
pagination.SinglePageBase
}
DomainPage is the page returned by a pager when traversing over a collection of domains.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a get operation. Call its Extract method to interpret it as a Domain.
func Get ¶
func Get(c *gophercloud.ServiceClient, id string) (r GetResult)
Get retrieves a specific domain based on its unique ID.
func (GetResult) Extract ¶
Extract is a function that accepts a result and extracts a domain resource.
func (GetResult) ExtractInto ¶
func (r GetResult) ExtractInto(v interface{}) error
type UpdateOpts ¶
type UpdateOpts struct { // ID of the domain DomainID string `json:"domain_id,omitempty"` // Name of the domain DomainName string `json:"domain_name,omitempty"` // Description of the domain Description string `json:"description,omitempty"` // SAP-User-Id of primary contact for the domain ResponsiblePrimaryContactID string `json:"responsible_primary_contact_id" required:"true"` // Email-address of primary contact for the domain ResponsiblePrimaryContactEmail string `json:"responsible_primary_contact_email" required:"true"` // SAP-User-Id of the controller who is responsible for the domain / the costobject ResponsibleControllerID string `json:"responsible_controller_id,omitempty"` // Email-address or DL of the person/group who is controlling the domain / the costobject ResponsibleControllerEmail string `json:"responsible_controller_email,omitempty"` // Freetext field for additional information for domain AdditionalInformation string `json:"additional_information,omitempty"` // The cost object structure CostObject CostObject `json:"cost_object" required:"true"` // Collector of the domain Collector string `json:"collector"` // Region of the domain Region string `json:"region"` }
UpdateOpts represents the attributes used when updating an existing domain.
func DomainToUpdateOpts ¶
func DomainToUpdateOpts(domain *Domain) UpdateOpts
func (UpdateOpts) ToDomainUpdateMap ¶
func (opts UpdateOpts) ToDomainUpdateMap() (map[string]interface{}, error)
ToDomainUpdateMap builds a request body from UpdateOpts.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional parameters to the Update request.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult represents the result of an update operation. Call its Extract method to interpret it as a Domain.
func Update ¶
func Update(c *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update accepts a UpdateOpts struct and updates an existing domain using the values provided.
func (UpdateResult) Extract ¶
Extract is a function that accepts a result and extracts a domain resource.
func (UpdateResult) ExtractInto ¶
func (r UpdateResult) ExtractInto(v interface{}) error