Documentation ¶
Overview ¶
Package account provides methods and message types of the account v2 API.
Index ¶
- Constants
- type API
- func (s *API) CreateProject(req *CreateProjectRequest, opts ...scw.RequestOption) (*Project, error)
- func (s *API) DeleteProject(req *DeleteProjectRequest, opts ...scw.RequestOption) error
- func (s *API) GetProject(req *GetProjectRequest, opts ...scw.RequestOption) (*Project, error)
- func (s *API) ListProjects(req *ListProjectsRequest, opts ...scw.RequestOption) (*ListProjectsResponse, error)
- func (s *API) UpdateProject(req *UpdateProjectRequest, opts ...scw.RequestOption) (*Project, error)
- type CreateProjectRequest
- type DeleteProjectRequest
- type GetProjectRequest
- type ListProjectsRequest
- type ListProjectsRequestOrderBy
- type ListProjectsResponse
- type Project
- type UpdateProjectRequest
Constants ¶
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 API ¶
type API struct {
// contains filtered or unexported fields
}
API: user related data. This API allows you to manage projects.
func (*API) CreateProject ¶
func (s *API) CreateProject(req *CreateProjectRequest, opts ...scw.RequestOption) (*Project, error)
CreateProject: create a new Project for an Organization. Generate a new Project for an Organization, specifying its configuration including name and description.
func (*API) DeleteProject ¶
func (s *API) DeleteProject(req *DeleteProjectRequest, opts ...scw.RequestOption) error
DeleteProject: delete an existing Project. 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 (*API) GetProject ¶
func (s *API) GetProject(req *GetProjectRequest, opts ...scw.RequestOption) (*Project, error)
GetProject: get an existing Project. 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 (*API) ListProjects ¶
func (s *API) ListProjects(req *ListProjectsRequest, opts ...scw.RequestOption) (*ListProjectsResponse, error)
ListProjects: list all Projects of an Organization. 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 include the creation and update date of the Project.
func (*API) UpdateProject ¶
func (s *API) UpdateProject(req *UpdateProjectRequest, opts ...scw.RequestOption) (*Project, error)
UpdateProject: update Project. Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.
type CreateProjectRequest ¶
type DeleteProjectRequest ¶
type DeleteProjectRequest struct { // ProjectID: project ID of the Project. ProjectID string `json:"-"` }
type GetProjectRequest ¶
type GetProjectRequest struct { // ProjectID: project ID of the Project. ProjectID string `json:"-"` }
type ListProjectsRequest ¶
type ListProjectsRequest 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:"-"` }
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 uint32 `json:"total_count"` // Projects: paginated returned Projects. Projects []*Project `json:"projects"` }
ListProjectsResponse: list projects response.
func (*ListProjectsResponse) UnsafeAppend ¶
func (r *ListProjectsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListProjectsResponse) UnsafeGetTotalCount ¶
func (r *ListProjectsResponse) UnsafeGetTotalCount() uint32
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.