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 ¶
View Source
const ( // ListProjectsRequestOrderByCreatedAtAsc is [insert doc]. ListProjectsRequestOrderByCreatedAtAsc = ListProjectsRequestOrderBy("created_at_asc") // ListProjectsRequestOrderByCreatedAtDesc is [insert doc]. ListProjectsRequestOrderByCreatedAtDesc = ListProjectsRequestOrderBy("created_at_desc") // ListProjectsRequestOrderByNameAsc is [insert doc]. ListProjectsRequestOrderByNameAsc = ListProjectsRequestOrderBy("name_asc") // ListProjectsRequestOrderByNameDesc is [insert doc]. 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 project
func (*API) DeleteProject ¶
func (s *API) DeleteProject(req *DeleteProjectRequest, opts ...scw.RequestOption) error
DeleteProject: delete project
func (*API) GetProject ¶
func (s *API) GetProject(req *GetProjectRequest, opts ...scw.RequestOption) (*Project, error)
GetProject: get project
func (*API) ListProjects ¶
func (s *API) ListProjects(req *ListProjectsRequest, opts ...scw.RequestOption) (*ListProjectsResponse, error)
ListProjects: list projects
func (*API) UpdateProject ¶
func (s *API) UpdateProject(req *UpdateProjectRequest, opts ...scw.RequestOption) (*Project, error)
UpdateProject: update project
type CreateProjectRequest ¶
type DeleteProjectRequest ¶
type DeleteProjectRequest struct { // ProjectID: the project ID of the project ProjectID string `json:"-"` }
type GetProjectRequest ¶
type GetProjectRequest struct { // ProjectID: the project ID of the project ProjectID string `json:"-"` }
type ListProjectsRequest ¶
type ListProjectsRequest struct { // OrganizationID: the organization ID of the project OrganizationID string `json:"-"` // Name: the name of the project Name *string `json:"-"` // Page: the page number for the returned projects Page *int32 `json:"-"` // PageSize: the maximum number of project per page PageSize *uint32 `json:"-"` // OrderBy: the sort order of the returned projects // // Default value: created_at_asc OrderBy ListProjectsRequestOrderBy `json:"-"` // ProjectIDs: filter out by a list of project ID 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: the total number of projects TotalCount uint32 `json:"total_count"` // Projects: the 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: the ID of the project ID string `json:"id"` // Name: the name of the project Name string `json:"name"` // OrganizationID: the organization ID of the project OrganizationID string `json:"organization_id"` // CreatedAt: the creation date of the project CreatedAt *time.Time `json:"created_at"` // UpdatedAt: the update date of the project UpdatedAt *time.Time `json:"updated_at"` // Description: the description of the project Description string `json:"description"` }
Project: project
type UpdateProjectRequest ¶
Click to show internal directories.
Click to hide internal directories.