account

package
v1.0.0-beta.25 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Overview

Package account provides methods and message types of the account v3 API.

Index

Constants

View Source
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 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

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 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

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.

Jump to

Keyboard shortcuts

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