Help us shape the future of Go! Take the 2026 Go Developer Survey

projects

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

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

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 ExtCertification

type ExtCertification struct {
	// C5 is a government-backed verification framework implemented by the German Federal Office for Information Security (BSI)
	C5 bool `json:"-"`
	// An ISO certification describes the process that confirms that ISO standards are being followed
	ISO bool `json:"-"`
	// PCI certification ensures the security of card data at your business through a set of requirements established by the PCI SSC
	PCI bool `json:"-"`
	// SOCx is a type of audit report that attests to the trustworthiness of services provided by a service organization
	SOC1 bool `json:"-"`
	SOC2 bool `json:"-"`
	// The law mandates strict reforms to improve financial disclosures from corporations and prevent accounting fraud
	SOX bool `json:"-"`
}

func (ExtCertification) MarshalJSON

func (r ExtCertification) MarshalJSON() ([]byte, error)

func (*ExtCertification) UnmarshalJSON

func (r *ExtCertification) UnmarshalJSON(b []byte) error

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

func (r GetResult) Extract() (*Project, error)

Extract is a function that accepts a result and extracts a project resource.

func (GetResult) ExtractInto

func (r GetResult) ExtractInto(v interface{}) error

type ListOpts

type ListOpts struct {
	CheckCOValidity bool      `q:"checkCOValidity"`
	ExcludeDeleted  bool      `q:"excludeDeleted"`
	From            time.Time `q:"-"`
}

ListOpts is a structure that holds options for listing project masterdata.

func (ListOpts) ToProjectListQuery

func (opts ListOpts) ToProjectListQuery() (string, error)

ToProjectListQuery formats a ListOpts into a query string.

type ListOptsBuilder

type ListOptsBuilder interface {
	ToProjectListQuery() (string, error)
}

ListOptsBuilder allows extensions to add additional parameters to the List request.

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"`
	// ID of the Person/entity responsible to correctly maintain assets in SAP's Global DC HW asset inventory SISM/CCIR
	ResponsibleInventoryRoleID string `json:"responsible_inventory_role_id"`
	// Email of the Person/entity responsible to correctly maintain assets in SAP's Global DC HW asset inventory SISM/CCIR
	ResponsibleInventoryRoleEmail string `json:"responsible_inventory_role_email"`
	// ID of the infrastructure coordinator
	ResponsibleInfrastructureCoordinatorID string `json:"responsible_infrastructure_coordinator_id"`
	// Email address of the infrastructure coordinator
	ResponsibleInfrastructureCoordinatorEmail string `json:"responsible_infrastructure_coordinator_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"`
	// Name of the Customer (CCIR/BPD Key)
	Customer string `json:"customer"`
	// Freetext field for additional information for project
	AdditionalInformation string `json:"additional_information"`
	// The cost object structure
	CostObject CostObject `json:"cost_object"`
	// Build environment of the project
	// Allowed values: [Prod,QA,Admin,DEV,Demo,Train,Sandbox,Lab,Test]
	Environment string `json:"environment"`
	// Software License Mode
	// Allowed values: [Revenue Generating,Training & Demo,Development,Test & QS,Administration,Make,Virtualization-Host,Productive]
	SoftLicenseMode string `json:"soft_license_mode"`
	// Input parameter for KRITIS flag in CCIR
	// Allowed values: [SAP Business Process,Customer Cloud Service,Customer Business Process,Training & Demo Cloud]
	TypeOfData string `json:"type_of_data"`
	// Uses GPUs
	GPUEnabled bool `json:"-"`
	// Required to harmonize with CALM and for further calculation of CIA
	ContainsPIIDPPHR bool `json:"-"`
	// Required to harmonize with CALM and for further calculation of CIA
	ContainsExternalCustomerData bool `json:"-"`
	// Information about whether there is any external certification present in this project
	ExtCertification *ExtCertification `json:"ext_certification,omitempty"`
	// 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) UnmarshalJSON

func (r *Project) UnmarshalJSON(b []byte) error

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"`
	// 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"`
	// ID of the Person/entity responsible to correctly maintain assets in SAP's Global DC HW asset inventory SISM/CCIR
	ResponsibleInventoryRoleID string `json:"responsible_inventory_role_id"`
	// Email of the Person/entity responsible to correctly maintain assets in SAP's Global DC HW asset inventory SISM/CCIR
	ResponsibleInventoryRoleEmail string `json:"responsible_inventory_role_email"`
	// ID of the infrastructure coordinator
	ResponsibleInfrastructureCoordinatorID string `json:"responsible_infrastructure_coordinator_id"`
	// Email address of the infrastructure coordinator
	ResponsibleInfrastructureCoordinatorEmail string `json:"responsible_infrastructure_coordinator_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"`
	// Name of the Customer (CCIR/BPD Key)
	Customer string `json:"customer"`
	// Freetext field for additional information for project
	AdditionalInformation string `json:"additional_information"`
	// The cost object structure
	CostObject CostObject `json:"cost_object" required:"true"`
	// Build environment of the project
	// Allowed values: [Prod,QA,Admin,DEV,Demo,Train,Sandbox,Lab,Test]
	Environment string `json:"environment"`
	// Software License Mode
	// Allowed values: [Revenue Generating,Training & Demo,Development,Test & QS,Administration,Make,Virtualization-Host,Productive]
	SoftLicenseMode string `json:"soft_license_mode"`
	// Input parameter for KRITIS flag in CCIR
	// Allowed values: [SAP Business Process,Customer Cloud Service,Customer Business Process,Training & Demo Cloud]
	TypeOfData string `json:"type_of_data"`
	// Uses GPUs
	GPUEnabled bool `json:"-"`
	// Required to harmonize with CALM and for further calculation of CIA
	ContainsPIIDPPHR bool `json:"-"`
	// Required to harmonize with CALM and for further calculation of CIA
	ContainsExternalCustomerData bool `json:"-"`
	// Information about whether there is any external certification present in this project
	ExtCertification *ExtCertification `json:"ext_certification,omitempty"`
	// 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) MarshalJSON

func (opts UpdateOpts) MarshalJSON() ([]byte, error)

func (UpdateOpts) ToProjectUpdateMap

func (opts UpdateOpts) ToProjectUpdateMap() (map[string]interface{}, error)

ToProjectUpdateMap builds a request body from UpdateOpts.

func (*UpdateOpts) UnmarshalJSON

func (opts *UpdateOpts) UnmarshalJSON(b []byte) error

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToProjectUpdateMap() (map[string]interface{}, error)
}

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

Update accepts a UpdateOpts struct and updates an existing project using the values provided.

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*Project, error)

Extract is a function that accepts a result and extracts a project resource.

func (UpdateResult) ExtractInto

func (r UpdateResult) ExtractInto(v interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL