Documentation
¶
Overview ¶
Package account provides methods and message types of the account v3 API.
Index ¶
- Constants
- type CheckContractSignatureResponse
- type Contract
- type ContractAPI
- func (s *ContractAPI) CheckContractSignature(req *ContractAPICheckContractSignatureRequest, opts ...scw.RequestOption) (*CheckContractSignatureResponse, error)
- func (s *ContractAPI) CreateContractSignature(req *ContractAPICreateContractSignatureRequest, opts ...scw.RequestOption) (*ContractSignature, error)
- func (s *ContractAPI) DownloadContractSignature(req *ContractAPIDownloadContractSignatureRequest, opts ...scw.RequestOption) (*scw.File, error)
- func (s *ContractAPI) ListContractSignatures(req *ContractAPIListContractSignaturesRequest, opts ...scw.RequestOption) (*ListContractSignaturesResponse, error)
- func (s *ContractAPI) ValidateContractSignature(req *ContractAPIValidateContractSignatureRequest, opts ...scw.RequestOption) (*ContractSignature, error)
- type ContractAPICheckContractSignatureRequest
- type ContractAPICreateContractSignatureRequest
- type ContractAPIDownloadContractSignatureRequest
- type ContractAPIListContractSignaturesRequest
- type ContractAPIValidateContractSignatureRequest
- type ContractSignature
- type ContractType
- type ListContractSignaturesRequestOrderBy
- func (enum ListContractSignaturesRequestOrderBy) MarshalJSON() ([]byte, error)
- func (enum ListContractSignaturesRequestOrderBy) String() string
- func (enum *ListContractSignaturesRequestOrderBy) UnmarshalJSON(data []byte) error
- func (enum ListContractSignaturesRequestOrderBy) Values() []ListContractSignaturesRequestOrderBy
- type ListContractSignaturesResponse
- type ListProjectsRequestOrderBy
- type ListProjectsResponse
- type Project
- type ProjectAPI
- func (s *ProjectAPI) CreateProject(req *ProjectAPICreateProjectRequest, opts ...scw.RequestOption) (*Project, error)
- func (s *ProjectAPI) DeleteProject(req *ProjectAPIDeleteProjectRequest, opts ...scw.RequestOption) error
- func (s *ProjectAPI) GetProject(req *ProjectAPIGetProjectRequest, opts ...scw.RequestOption) (*Project, error)
- func (s *ProjectAPI) ListProjects(req *ProjectAPIListProjectsRequest, opts ...scw.RequestOption) (*ListProjectsResponse, error)
- func (s *ProjectAPI) UpdateProject(req *ProjectAPIUpdateProjectRequest, opts ...scw.RequestOption) (*Project, error)
- type ProjectAPICreateProjectRequest
- type ProjectAPIDeleteProjectRequest
- type ProjectAPIGetProjectRequest
- type ProjectAPIListProjectsRequest
- type ProjectAPIUpdateProjectRequest
Constants ¶
const ( // Unknown type. ContractTypeUnknownType = ContractType("unknown_type") // A global contract. ContractTypeGlobal = ContractType("global") // Deprecated. A contract specific to the Kubernetes product. ContractTypeK8s = ContractType("k8s") // A contract specific to the Instance product. ContractTypeInstance = ContractType("instance") // A contract specific to Container products. ContractTypeContainer = ContractType("container") // A contract specific to Baremetal products. ContractTypeBaremetal = ContractType("baremetal") )
const ( // Signing date ascending. ListContractSignaturesRequestOrderBySignedAtAsc = ListContractSignaturesRequestOrderBy("signed_at_asc") // Signing date descending. ListContractSignaturesRequestOrderBySignedAtDesc = ListContractSignaturesRequestOrderBy("signed_at_desc") // Expiration date ascending. ListContractSignaturesRequestOrderByExpiresAtAsc = ListContractSignaturesRequestOrderBy("expires_at_asc") // Expiration date descending. ListContractSignaturesRequestOrderByExpiresAtDesc = ListContractSignaturesRequestOrderBy("expires_at_desc") // Name ascending. ListContractSignaturesRequestOrderByNameAsc = ListContractSignaturesRequestOrderBy("name_asc") // Name descending. ListContractSignaturesRequestOrderByNameDesc = ListContractSignaturesRequestOrderBy("name_desc") )
const ( // Creation date ascending. ListProjectsRequestOrderByCreatedAtAsc = ListProjectsRequestOrderBy("created_at_asc") // Creation date descending. ListProjectsRequestOrderByCreatedAtDesc = ListProjectsRequestOrderBy("created_at_desc") // Name ascending. ListProjectsRequestOrderByNameAsc = ListProjectsRequestOrderBy("name_asc") // Name descending. ListProjectsRequestOrderByNameDesc = ListProjectsRequestOrderBy("name_desc") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckContractSignatureResponse ¶
type CheckContractSignatureResponse struct { // Created: whether a signature has been requested for this contract. Created bool `json:"created"` // Validated: whether the signature for this contract has been validated. Validated bool `json:"validated"` }
CheckContractSignatureResponse: check contract signature response.
type Contract ¶
type Contract struct { // ID: ID of the contract. ID string `json:"id"` // Type: the type of the contract. // Default value: unknown_type Type ContractType `json:"type"` // Name: the name of the contract. Name string `json:"name"` // Version: the version of the contract. Version uint32 `json:"version"` // CreatedAt: the creation date of the contract. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: the last modification date of the contract. UpdatedAt *time.Time `json:"updated_at"` }
Contract: contract.
type ContractAPI ¶
type ContractAPI struct {
// contains filtered or unexported fields
}
The Contract API allows you to manage contracts.
func NewContractAPI ¶
func NewContractAPI(client *scw.Client) *ContractAPI
NewContractAPI returns a ContractAPI object from a Scaleway client.
func (*ContractAPI) CheckContractSignature ¶
func (s *ContractAPI) CheckContractSignature(req *ContractAPICheckContractSignatureRequest, opts ...scw.RequestOption) (*CheckContractSignatureResponse, error)
CheckContractSignature: Check if a contract is signed for your Organization.
func (*ContractAPI) CreateContractSignature ¶
func (s *ContractAPI) CreateContractSignature(req *ContractAPICreateContractSignatureRequest, opts ...scw.RequestOption) (*ContractSignature, error)
CreateContractSignature: Create a signature for your Organization for the latest version of the requested contract.
func (*ContractAPI) DownloadContractSignature ¶
func (s *ContractAPI) DownloadContractSignature(req *ContractAPIDownloadContractSignatureRequest, opts ...scw.RequestOption) (*scw.File, error)
DownloadContractSignature: Download a contract content.
func (*ContractAPI) ListContractSignatures ¶
func (s *ContractAPI) ListContractSignatures(req *ContractAPIListContractSignaturesRequest, opts ...scw.RequestOption) (*ListContractSignaturesResponse, error)
ListContractSignatures: List contract signatures for an Organization.
func (*ContractAPI) ValidateContractSignature ¶
func (s *ContractAPI) ValidateContractSignature(req *ContractAPIValidateContractSignatureRequest, opts ...scw.RequestOption) (*ContractSignature, error)
ValidateContractSignature: Sign a contract for your Organization.
type ContractAPICheckContractSignatureRequest ¶
type ContractAPICheckContractSignatureRequest struct { // OrganizationID: ID of the Organization to check the contract signature for. OrganizationID string `json:"organization_id"` // ContractType: filter on contract type. // Default value: unknown_type ContractType ContractType `json:"contract_type"` // ContractName: filter on contract name. ContractName string `json:"contract_name"` }
ContractAPICheckContractSignatureRequest: contract api check contract signature request.
type ContractAPICreateContractSignatureRequest ¶
type ContractAPICreateContractSignatureRequest struct { // ContractType: the type of the contract. // Default value: unknown_type ContractType ContractType `json:"contract_type"` // ContractName: the name of the contract. ContractName string `json:"contract_name"` // Validated: whether the contract is validated at creation. Validated bool `json:"validated"` // OrganizationID: ID of the Organization. OrganizationID string `json:"organization_id"` }
ContractAPICreateContractSignatureRequest: contract api create contract signature request.
type ContractAPIDownloadContractSignatureRequest ¶
type ContractAPIDownloadContractSignatureRequest struct { // ContractSignatureID: the contract signature ID. ContractSignatureID string `json:"-"` // Locale: the locale requested for the content of the contract. // Default value: unknown_language_code Locale std.LanguageCode `json:"-"` }
ContractAPIDownloadContractSignatureRequest: contract api download contract signature request.
type ContractAPIListContractSignaturesRequest ¶
type ContractAPIListContractSignaturesRequest struct { // Page: the page number for the returned contracts. Page *int32 `json:"-"` // PageSize: the maximum number of contracts per page. PageSize *uint32 `json:"-"` // OrderBy: how the contracts are ordered in the response. // Default value: signed_at_asc OrderBy ListContractSignaturesRequestOrderBy `json:"-"` // OrganizationID: filter on Organization ID. OrganizationID string `json:"-"` }
ContractAPIListContractSignaturesRequest: contract api list contract signatures request.
type ContractAPIValidateContractSignatureRequest ¶
type ContractAPIValidateContractSignatureRequest struct { // ContractSignatureID: the contract linked to your Organization you want to sign. ContractSignatureID string `json:"-"` }
ContractAPIValidateContractSignatureRequest: contract api validate contract signature request.
type ContractSignature ¶
type ContractSignature struct { // ID: ID of the contract signature. ID string `json:"id"` // OrganizationID: the Organization ID which signed the contract. OrganizationID string `json:"organization_id"` // CreatedAt: the creation date of the contract signature. CreatedAt *time.Time `json:"created_at"` // SignedAt: the signing date of the contract signature. SignedAt *time.Time `json:"signed_at"` // ExpiresAt: the expiration date of the contract signature. ExpiresAt *time.Time `json:"expires_at"` // Contract: the contract signed. Contract *Contract `json:"contract"` }
ContractSignature: contract signature.
type ContractType ¶
type ContractType string
func (ContractType) MarshalJSON ¶
func (enum ContractType) MarshalJSON() ([]byte, error)
func (ContractType) String ¶
func (enum ContractType) String() string
func (*ContractType) UnmarshalJSON ¶
func (enum *ContractType) UnmarshalJSON(data []byte) error
func (ContractType) Values ¶
func (enum ContractType) Values() []ContractType
type ListContractSignaturesRequestOrderBy ¶
type ListContractSignaturesRequestOrderBy string
func (ListContractSignaturesRequestOrderBy) MarshalJSON ¶
func (enum ListContractSignaturesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListContractSignaturesRequestOrderBy) String ¶
func (enum ListContractSignaturesRequestOrderBy) String() string
func (*ListContractSignaturesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListContractSignaturesRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListContractSignaturesRequestOrderBy) Values ¶
func (enum ListContractSignaturesRequestOrderBy) Values() []ListContractSignaturesRequestOrderBy
type ListContractSignaturesResponse ¶
type ListContractSignaturesResponse struct { // TotalCount: the total number of contract signatures. TotalCount uint64 `json:"total_count"` // ContractSignatures: the paginated returned contract signatures. ContractSignatures []*ContractSignature `json:"contract_signatures"` }
ListContractSignaturesResponse: list contract signatures response.
func (*ListContractSignaturesResponse) UnsafeAppend ¶
func (r *ListContractSignaturesResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListContractSignaturesResponse) UnsafeGetTotalCount ¶
func (r *ListContractSignaturesResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListProjectsRequestOrderBy ¶
type ListProjectsRequestOrderBy string
func (ListProjectsRequestOrderBy) MarshalJSON ¶
func (enum ListProjectsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListProjectsRequestOrderBy) String ¶
func (enum ListProjectsRequestOrderBy) String() string
func (*ListProjectsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListProjectsRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListProjectsRequestOrderBy) Values ¶
func (enum ListProjectsRequestOrderBy) Values() []ListProjectsRequestOrderBy
type ListProjectsResponse ¶
type ListProjectsResponse struct { // TotalCount: total number of Projects. TotalCount uint64 `json:"total_count"` // Projects: paginated returned Projects. Projects []*Project `json:"projects"` }
ListProjectsResponse: list projects response.
func (*ListProjectsResponse) UnsafeAppend ¶
func (r *ListProjectsResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListProjectsResponse) UnsafeGetTotalCount ¶
func (r *ListProjectsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type Project ¶
type Project struct { // ID: ID of the Project. ID string `json:"id"` // Name: name of the Project. Name string `json:"name"` // OrganizationID: organization ID of the Project. OrganizationID string `json:"organization_id"` // CreatedAt: creation date of the Project. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: update date of the Project. UpdatedAt *time.Time `json:"updated_at"` // Description: description of the Project. Description string `json:"description"` }
Project: project.
type ProjectAPI ¶
type ProjectAPI struct {
// contains filtered or unexported fields
}
This API allows you to manage your Scaleway Projects.
func NewProjectAPI ¶
func NewProjectAPI(client *scw.Client) *ProjectAPI
NewProjectAPI returns a ProjectAPI object from a Scaleway client.
func (*ProjectAPI) CreateProject ¶
func (s *ProjectAPI) CreateProject(req *ProjectAPICreateProjectRequest, opts ...scw.RequestOption) (*Project, error)
CreateProject: Generate a new Project for an Organization, specifying its configuration including name and description.
func (*ProjectAPI) DeleteProject ¶
func (s *ProjectAPI) DeleteProject(req *ProjectAPIDeleteProjectRequest, opts ...scw.RequestOption) error
DeleteProject: Delete an existing Project, specified by its Project ID. The Project needs to be empty (meaning there are no resources left in it) to be deleted effectively. Note that deleting a Project is permanent, and cannot be undone.
func (*ProjectAPI) GetProject ¶
func (s *ProjectAPI) GetProject(req *ProjectAPIGetProjectRequest, opts ...scw.RequestOption) (*Project, error)
GetProject: Retrieve information about an existing Project, specified by its Project ID. Its full details, including ID, name and description, are returned in the response object.
func (*ProjectAPI) ListProjects ¶
func (s *ProjectAPI) ListProjects(req *ProjectAPIListProjectsRequest, opts ...scw.RequestOption) (*ListProjectsResponse, error)
ListProjects: List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names, and IDs. Other information includes the creation and update date of the Project.
func (*ProjectAPI) UpdateProject ¶
func (s *ProjectAPI) UpdateProject(req *ProjectAPIUpdateProjectRequest, opts ...scw.RequestOption) (*Project, error)
UpdateProject: Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.
type ProjectAPICreateProjectRequest ¶
type ProjectAPICreateProjectRequest struct { // Name: name of the Project. Name string `json:"name"` // OrganizationID: organization ID of the Project. OrganizationID string `json:"organization_id"` // Description: description of the Project. Description string `json:"description"` }
ProjectAPICreateProjectRequest: project api create project request.
type ProjectAPIDeleteProjectRequest ¶
type ProjectAPIDeleteProjectRequest struct { // ProjectID: project ID of the Project. ProjectID string `json:"-"` }
ProjectAPIDeleteProjectRequest: project api delete project request.
type ProjectAPIGetProjectRequest ¶
type ProjectAPIGetProjectRequest struct { // ProjectID: project ID of the Project. ProjectID string `json:"-"` }
ProjectAPIGetProjectRequest: project api get project request.
type ProjectAPIListProjectsRequest ¶
type ProjectAPIListProjectsRequest struct { // OrganizationID: organization ID of the Project. OrganizationID string `json:"-"` // Name: name of the Project. Name *string `json:"-"` // Page: page number for the returned Projects. Page *int32 `json:"-"` // PageSize: maximum number of Project per page. PageSize *uint32 `json:"-"` // OrderBy: sort order of the returned Projects. // Default value: created_at_asc OrderBy ListProjectsRequestOrderBy `json:"-"` // ProjectIDs: project IDs to filter for. The results will be limited to any Projects with an ID in this array. ProjectIDs []string `json:"-"` }
ProjectAPIListProjectsRequest: project api list projects request.
type ProjectAPIUpdateProjectRequest ¶
type ProjectAPIUpdateProjectRequest struct { // ProjectID: project ID of the Project. ProjectID string `json:"-"` // Name: name of the Project. Name *string `json:"name,omitempty"` // Description: description of the Project. Description *string `json:"description,omitempty"` }
ProjectAPIUpdateProjectRequest: project api update project request.