Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractProjectsInto ¶
func ExtractProjectsInto(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 projects.
Types ¶
type CostObject ¶
type CostObject struct {
// Shows, if the CO is inherited. Mandatory, if name/type not set
Inherited bool `json:"inherited"`
// Name of the costobject. Mandatory, if inherited not true
Name string `json:"name,omitempty"`
// Costobject-Type Type of the costobject. Mandatory, if inherited not true
// IO, CC, WBS, SO
Type string `json:"type,omitempty"`
}
The cost object structure
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 Project.
func Get ¶
func Get(c *gophercloud.ServiceClient, id string) (r GetResult)
Get retrieves a specific project based on its unique ID.
func (GetResult) Extract ¶
Extract is a function that accepts a result and extracts a project resource.
func (GetResult) ExtractInto ¶
func (r GetResult) ExtractInto(v interface{}) error
type Project ¶
type Project struct {
// A project ID
ProjectID string `json:"project_id"`
// Human-readable name for the project. Might not be unique.
ProjectName string `json:"project_name"`
// Technical of the domain in which the project is contained
DomainID string `json:"domain_id"`
// Name of the domain
DomainName string `json:"domain_name"`
// Description of the project
Description string `json:"description"`
// A project parent ID
ParentID string `json:"parent_id"`
// A project type
ProjectType string `json:"project_type"`
// SAP-User-Id of primary contact for the project
ResponsiblePrimaryContactID string `json:"responsible_primary_contact_id"`
// Email-address of primary contact for the project
ResponsiblePrimaryContactEmail string `json:"responsible_primary_contact_email"`
// SAP-User-Id of the person who is responsible for operating the project
ResponsibleOperatorID string `json:"responsible_operator_id"`
// Email-address or DL of the person/group who is operating the project
ResponsibleOperatorEmail string `json:"responsible_operator_email"`
// SAP-User-Id of the person who is responsible for the security of the project
ResponsibleSecurityExpertID string `json:"responsible_security_expert_id"`
// Email-address or DL of the person/group who is responsible for the security of the project
ResponsibleSecurityExpertEmail string `json:"responsible_security_expert_email"`
// SAP-User-Id of the product owner
ResponsibleProductOwnerID string `json:"responsible_product_owner_id"`
// Email-address or DL of the product owner
ResponsibleProductOwnerEmail string `json:"responsible_product_owner_email"`
// SAP-User-Id of the controller who is responsible for the project / the costobject
ResponsibleControllerID string `json:"responsible_controller_id"`
// Email-address or DL of the person/group who is controlling the project / the costobject
ResponsibleControllerEmail string `json:"responsible_controller_email"`
// Indicating if the project is directly or indirectly creating revenue
// Allowed values: [generating, enabling, other]
RevenueRelevance string `json:"revenue_relevance"`
// Indicates how important the project for the business is. Possible values: [dev,test,prod]
// Allowed values: [dev, test, prod]
BusinessCriticality string `json:"business_criticality"`
// If the number is unclear, always provide the lower end --> means always > number_of_endusers (-1 indicates that it is infinite)
NumberOfEndusers int `json:"number_of_endusers"`
// Freetext field for additional information for project
AdditionalInformation string `json:"additional_information"`
// The cost object structure
CostObject CostObject `json:"cost_object"`
// The date, when the project was created.
CreatedAt time.Time `json:"-"`
// The date, when the project 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"`
// Only contained in Server response: Collector of the project
Collector string `json:"collector"`
// Only contained in Server response: Region of the project
Region string `json:"region"`
}
Project represents a Billing Project.
func ExtractProjects ¶
func ExtractProjects(r pagination.Page) ([]Project, error)
ExtractProjects accepts a Page struct, specifically a ProjectPage struct, and extracts the elements into a slice of Project structs. In other words, a generic collection is mapped into a relevant slice.
func (*Project) MarshalJSON ¶
func (*Project) UnmarshalJSON ¶
type ProjectPage ¶
type ProjectPage struct {
pagination.SinglePageBase
}
ProjectPage is the page returned by a pager when traversing over a collection of projects.
type UpdateOpts ¶
type UpdateOpts struct {
// Description of the project
Description string `json:"description,omitempty"`
// SAP-User-Id of primary contact for the project
ResponsiblePrimaryContactID string `json:"responsible_primary_contact_id" required:"true"`
// Email-address of primary contact for the project
ResponsiblePrimaryContactEmail string `json:"responsible_primary_contact_email" required:"true"`
// SAP-User-Id of the person who is responsible for operating the project
ResponsibleOperatorID string `json:"responsible_operator_id,omitempty"`
// Email-address or DL of the person/group who is operating the project
ResponsibleOperatorEmail string `json:"responsible_operator_email,omitempty"`
// SAP-User-Id of the person who is responsible for the security of the project
ResponsibleSecurityExpertID string `json:"responsible_security_expert_id,omitempty"`
// Email-address or DL of the person/group who is responsible for the security of the project
ResponsibleSecurityExpertEmail string `json:"responsible_security_expert_email,omitempty"`
// SAP-User-Id of the product owner
ResponsibleProductOwnerID string `json:"responsible_product_owner_id,omitempty"`
// Email-address or DL of the product owner
ResponsibleProductOwnerEmail string `json:"responsible_product_owner_email,omitempty"`
// SAP-User-Id of the controller who is responsible for the project / the costobject
ResponsibleControllerID string `json:"responsible_controller_id,omitempty"`
// Email-address or DL of the person/group who is controlling the project / the costobject
ResponsibleControllerEmail string `json:"responsible_controller_email,omitempty"`
// Indicating if the project is directly or indirectly creating revenue
// Allowed values: [generating, enabling, other]
RevenueRelevance string `json:"revenue_relevance,omitempty"`
// Indicates how important the project for the business is. Possible values: [dev,test,prod]
// Allowed values: [dev, test, prod]
BusinessCriticality string `json:"business_criticality,omitempty"`
// If the number is unclear, always provide the lower end --> means always > number_of_endusers (-1 indicates that it is infinite)
NumberOfEndusers int `json:"number_of_endusers"`
// Freetext field for additional information for project
AdditionalInformation string `json:"additional_information,omitempty"`
// The cost object structure
CostObject CostObject `json:"cost_object" required:"true"`
// when the token is not scoped
// A project ID
ProjectID string `json:"project_id,omitempty"`
// Human-readable name for the project. Might not be unique.
ProjectName string `json:"project_name,omitempty"`
// Technical of the domain in which the project is contained
DomainID string `json:"domain_id,omitempty"`
// Name of the domain
DomainName string `json:"domain_name,omitempty"`
// A project parent ID
ParentID string `json:"parent_id,omitempty"`
// A project type
ProjectType string `json:"project_type,omitempty"`
}
UpdateOpts represents the attributes used when updating an existing project.
func ProjectToUpdateOpts ¶
func ProjectToUpdateOpts(project *Project) UpdateOpts
func (UpdateOpts) ToProjectUpdateMap ¶
func (opts UpdateOpts) ToProjectUpdateMap() (map[string]interface{}, error)
ToProjectUpdateMap 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 Project.
func Update ¶
func Update(c *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update accepts a UpdateOpts struct and updates an existing project using the values provided.
func (UpdateResult) Extract ¶
Extract is a function that accepts a result and extracts a project resource.
func (UpdateResult) ExtractInto ¶
func (r UpdateResult) ExtractInto(v interface{}) error