Documentation ¶
Index ¶
- func CacheExpires(r *http.Response) time.Time
- func NewConfiguration(region string, apiKeys ...*ncloud.APIKey) *ncloud.Configuration
- type APIClient
- type APIResponse
- type CancelBuild
- type ChangeProject
- type CreateProject
- type CreateProjectResponse
- type EnvPlatformConfigRequest
- type EnvPlatformConfigRequestOs
- type EnvPlatformConfigRequestRuntime
- type EnvPlatformConfigRequestRuntimeVersion
- type EnvPlatformConfigResponse
- type EnvPlatformConfigResponseOs
- type EnvPlatformConfigResponseRuntime
- type EnvPlatformConfigResponseRuntimeVersion
- type GetBuildHistoryResponse
- type GetBuildHistoryResponseHistory
- type GetComputeEnvResponse
- type GetComputeEnvResponseCompute
- type GetContainerRegistryResponse
- type GetContainerRegistryResponseRegistry
- type GetDockerEnvResponse
- type GetDockerEnvResponseDocker
- type GetObjsBucketResponse
- type GetObjsBucketResponseBucket
- type GetOsEnvResponse
- type GetOsEnvResponseOs
- type GetProjectDetailResponse
- type GetProjectDetailResponseArtifact
- type GetProjectDetailResponseArtifactStorage
- type GetProjectDetailResponseCreated
- type GetProjectDetailResponseEnv
- type GetProjectDetailResponseEnvCompute
- type GetProjectDetailResponseEnvDocker
- type GetProjectDetailResponseEnvPlatform
- type GetProjectDetailResponseLastBuild
- type GetProjectDetailResponseSource
- type GetProjectDetailResponseSourceConfig
- type GetProjectListResponse
- type GetProjectListResponseProject
- type GetRuntimeEnvResponse
- type GetRuntimeVersionEnvResponse
- type GetScBranchResponse
- type GetScRepositoryResponse
- type GetScRepositoryResponseRepository
- type ProjectArtifact
- type ProjectArtifactStorage
- type ProjectCache
- type ProjectCmd
- type ProjectCmdDockerbuild
- type ProjectEnv
- type ProjectEnvCompute
- type ProjectEnvDocker
- type ProjectEnvEnvVars
- type ProjectEnvPlatform
- type ProjectLinked
- type ProjectSource
- type ProjectSourceConfig
- type StartBuildResponse
- type V1ApiService
- func (a *V1ApiService) CancelBuild(ctx context.Context, body *CancelBuild, projectId *string) error
- func (a *V1ApiService) ChangeProject(ctx context.Context, body *ChangeProject, projectId *string) (*CreateProjectResponse, error)
- func (a *V1ApiService) CreateProject(ctx context.Context, body *CreateProject) (*CreateProjectResponse, error)
- func (a *V1ApiService) DeleteProject(ctx context.Context, projectId *string) error
- func (a *V1ApiService) GetBuildHistory(ctx context.Context, projectId *string) (*GetBuildHistoryResponse, error)
- func (a *V1ApiService) GetComputeEnv(ctx context.Context) (*GetComputeEnvResponse, error)
- func (a *V1ApiService) GetContainerRegistry(ctx context.Context) (*GetContainerRegistryResponse, error)
- func (a *V1ApiService) GetDockerEnv(ctx context.Context) (*GetDockerEnvResponse, error)
- func (a *V1ApiService) GetObjectstorageBucket(ctx context.Context) (*GetObjsBucketResponse, error)
- func (a *V1ApiService) GetOsEnv(ctx context.Context) (*GetOsEnvResponse, error)
- func (a *V1ApiService) GetProject(ctx context.Context, projectId *string) (*GetProjectDetailResponse, error)
- func (a *V1ApiService) GetProjects(ctx context.Context, localVarOptionals map[string]interface{}) (*GetProjectListResponse, error)
- func (a *V1ApiService) GetRuntimeEnv(ctx context.Context, osId *string) (*GetRuntimeEnvResponse, error)
- func (a *V1ApiService) GetRuntimeVersionEnv(ctx context.Context, osId *string, runtimeId *string) (*GetRuntimeVersionEnvResponse, error)
- func (a *V1ApiService) GetSourcecommitRepositories(ctx context.Context) (*GetScRepositoryResponse, error)
- func (a *V1ApiService) GetSourcecommitRepositoryBranches(ctx context.Context, repositoryName *string) (*GetScBranchResponse, error)
- func (a *V1ApiService) StartBuild(ctx context.Context, projectId *string) (*StartBuildResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheExpires ¶
CacheExpires helper function to determine remaining time before repeating a request.
func NewConfiguration ¶
func NewConfiguration(region string, apiKeys ...*ncloud.APIKey) *ncloud.Configuration
Types ¶
type APIClient ¶
type APIClient struct { // API Services V1Api *V1ApiService // contains filtered or unexported fields }
APIClient manages communication with the sourcebuild API v2022-04-22T08:24:50Z In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *ncloud.Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the swagger operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type CancelBuild ¶
type CancelBuild struct {
BuildId *string `json:"buildId"`
}
type ChangeProject ¶
type ChangeProject struct { Description *string `json:"description,omitempty"` Source *ProjectSource `json:"source,omitempty"` Env *ProjectEnv `json:"env,omitempty"` Cmd *ProjectCmd `json:"cmd,omitempty"` Artifact *ProjectArtifact `json:"artifact,omitempty"` Cache *ProjectCache `json:"cache,omitempty"` Linked *ProjectLinked `json:"linked,omitempty"` }
type CreateProject ¶
type CreateProject struct { Name *string `json:"name"` Description *string `json:"description,omitempty"` Source *ProjectSource `json:"source"` Env *ProjectEnv `json:"env"` Cmd *ProjectCmd `json:"cmd,omitempty"` Artifact *ProjectArtifact `json:"artifact,omitempty"` Cache *ProjectCache `json:"cache,omitempty"` Linked *ProjectLinked `json:"linked,omitempty"` }
type CreateProjectResponse ¶
type EnvPlatformConfigRequest ¶
type EnvPlatformConfigRequest struct { Os *EnvPlatformConfigRequestOs `json:"os,omitempty"` Runtime *EnvPlatformConfigRequestRuntime `json:"runtime,omitempty"` Registry *string `json:"registry,omitempty"` Image *string `json:"image,omitempty"` Tag *string `json:"tag,omitempty"` }
type EnvPlatformConfigRequestOs ¶
type EnvPlatformConfigRequestOs struct {
Id *int32 `json:"id,omitempty"`
}
os id
type EnvPlatformConfigRequestRuntime ¶
type EnvPlatformConfigRequestRuntime struct { Id *int32 `json:"id,omitempty"` Version *EnvPlatformConfigRequestRuntimeVersion `json:"version,omitempty"` }
type EnvPlatformConfigRequestRuntimeVersion ¶
type EnvPlatformConfigRequestRuntimeVersion struct {
Id *int32 `json:"id,omitempty"`
}
runtime version id
type EnvPlatformConfigResponse ¶
type EnvPlatformConfigResponse struct { Os *EnvPlatformConfigResponseOs `json:"os,omitempty"` Runtime *EnvPlatformConfigResponseRuntime `json:"runtime,omitempty"` Registry *string `json:"registry,omitempty"` Image *string `json:"image,omitempty"` Tag *string `json:"tag,omitempty"` }
type EnvPlatformConfigResponseRuntime ¶
type EnvPlatformConfigResponseRuntime struct { Id *int32 `json:"id,omitempty"` Name *string `json:"name,omitempty"` Version *EnvPlatformConfigResponseRuntimeVersion `json:"version,omitempty"` }
type GetBuildHistoryResponse ¶
type GetBuildHistoryResponse struct { Total *int32 `json:"total,omitempty"` History []*GetBuildHistoryResponseHistory `json:"history,omitempty"` }
type GetBuildHistoryResponseHistory ¶
type GetBuildHistoryResponseHistory struct { ProjectId *int32 `json:"projectId,omitempty"` BuildId *string `json:"buildId,omitempty"` Begin *int32 `json:"begin,omitempty"` End *int32 `json:"end,omitempty"` UserId *string `json:"userId,omitempty"` Status *string `json:"status,omitempty"` FailedPhase *string `json:"failedPhase,omitempty"` }
type GetComputeEnvResponse ¶
type GetComputeEnvResponse struct {
Compute []*GetComputeEnvResponseCompute `json:"compute,omitempty"`
}
type GetContainerRegistryResponse ¶
type GetContainerRegistryResponse struct {
Registry []*GetContainerRegistryResponseRegistry `json:"registry,omitempty"`
}
type GetDockerEnvResponse ¶
type GetDockerEnvResponse struct {
Docker []*GetDockerEnvResponseDocker `json:"docker,omitempty"`
}
type GetObjsBucketResponse ¶
type GetObjsBucketResponse struct {
Bucket []*GetObjsBucketResponseBucket `json:"bucket,omitempty"`
}
type GetOsEnvResponse ¶
type GetOsEnvResponse struct {
Os []*GetOsEnvResponseOs `json:"os,omitempty"`
}
type GetOsEnvResponseOs ¶
type GetProjectDetailResponse ¶
type GetProjectDetailResponse struct { Id *int32 `json:"id,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Created *GetProjectDetailResponseCreated `json:"created,omitempty"` Source *GetProjectDetailResponseSource `json:"source,omitempty"` Env *GetProjectDetailResponseEnv `json:"env,omitempty"` Cmd *ProjectCmd `json:"cmd,omitempty"` Artifact *GetProjectDetailResponseArtifact `json:"artifact,omitempty"` Cache *ProjectCache `json:"cache,omitempty"` Linked *ProjectLinked `json:"linked,omitempty"` LastBuild *GetProjectDetailResponseLastBuild `json:"lastBuild,omitempty"` }
type GetProjectDetailResponseArtifact ¶
type GetProjectDetailResponseArtifact struct { Use *bool `json:"use,omitempty"` Path []*string `json:"path,omitempty"` Storage *GetProjectDetailResponseArtifactStorage `json:"storage,omitempty"` Backup *bool `json:"backup,omitempty"` }
type GetProjectDetailResponseEnv ¶
type GetProjectDetailResponseEnv struct { Compute *GetProjectDetailResponseEnvCompute `json:"compute,omitempty"` Platform *GetProjectDetailResponseEnvPlatform `json:"platform,omitempty"` Docker *GetProjectDetailResponseEnvDocker `json:"docker,omitempty"` Timeout *int32 `json:"timeout,omitempty"` EnvVars []*ProjectEnvEnvVars `json:"envVars,omitempty"` }
type GetProjectDetailResponseEnvPlatform ¶
type GetProjectDetailResponseEnvPlatform struct { Type_ *string `json:"type,omitempty"` Config *EnvPlatformConfigResponse `json:"config,omitempty"` }
type GetProjectDetailResponseSource ¶
type GetProjectDetailResponseSource struct { Type_ *string `json:"type,omitempty"` Config *GetProjectDetailResponseSourceConfig `json:"config,omitempty"` }
type GetProjectListResponse ¶
type GetProjectListResponse struct { Total *int32 `json:"total,omitempty"` Project []*GetProjectListResponseProject `json:"project,omitempty"` }
type GetRuntimeEnvResponse ¶
type GetRuntimeEnvResponse struct {
Runtime []*GetDockerEnvResponseDocker `json:"runtime,omitempty"`
}
type GetRuntimeVersionEnvResponse ¶
type GetRuntimeVersionEnvResponse struct {
Version []*GetDockerEnvResponseDocker `json:"version,omitempty"`
}
type GetScBranchResponse ¶
type GetScRepositoryResponse ¶
type GetScRepositoryResponse struct {
Repository []*GetScRepositoryResponseRepository `json:"repository,omitempty"`
}
type ProjectArtifact ¶
type ProjectArtifact struct { Use *bool `json:"use,omitempty"` Path []*string `json:"path,omitempty"` Storage *ProjectArtifactStorage `json:"storage,omitempty"` Backup *bool `json:"backup,omitempty"` }
type ProjectArtifactStorage ¶
type ProjectCache ¶
type ProjectCmd ¶
type ProjectCmd struct { Pre []*string `json:"pre"` Build []*string `json:"build"` Post []*string `json:"post"` Dockerbuild *ProjectCmdDockerbuild `json:"dockerbuild,omitempty"` }
type ProjectCmdDockerbuild ¶
type ProjectEnv ¶
type ProjectEnv struct { Compute *ProjectEnvCompute `json:"compute"` Platform *ProjectEnvPlatform `json:"platform"` Docker *ProjectEnvDocker `json:"docker,omitempty"` Timeout *int32 `json:"timeout,omitempty"` EnvVars []*ProjectEnvEnvVars `json:"envVars,omitempty"` }
type ProjectEnvCompute ¶
type ProjectEnvCompute struct {
Id *int32 `json:"id"`
}
type ProjectEnvDocker ¶
type ProjectEnvEnvVars ¶
type ProjectEnvPlatform ¶
type ProjectEnvPlatform struct { Type_ *string `json:"type"` Config *EnvPlatformConfigRequest `json:"config"` }
type ProjectLinked ¶
type ProjectSource ¶
type ProjectSource struct { Type_ *string `json:"type"` Config *ProjectSourceConfig `json:"config"` }
type ProjectSourceConfig ¶
type StartBuildResponse ¶
type V1ApiService ¶
type V1ApiService service
func (*V1ApiService) CancelBuild ¶
func (a *V1ApiService) CancelBuild(ctx context.Context, body *CancelBuild, projectId *string) error
V1ApiService
@param body @param projectId projectId @return
func (*V1ApiService) ChangeProject ¶
func (a *V1ApiService) ChangeProject(ctx context.Context, body *ChangeProject, projectId *string) (*CreateProjectResponse, error)
V1ApiService
@param body @param projectId projectId @return *CreateProjectResponse
func (*V1ApiService) CreateProject ¶
func (a *V1ApiService) CreateProject(ctx context.Context, body *CreateProject) (*CreateProjectResponse, error)
V1ApiService
@param body @return *CreateProjectResponse
func (*V1ApiService) DeleteProject ¶
func (a *V1ApiService) DeleteProject(ctx context.Context, projectId *string) error
V1ApiService
@param projectId projectId @return
func (*V1ApiService) GetBuildHistory ¶
func (a *V1ApiService) GetBuildHistory(ctx context.Context, projectId *string) (*GetBuildHistoryResponse, error)
V1ApiService
@param projectId projectId @return *GetBuildHistoryResponse
func (*V1ApiService) GetComputeEnv ¶
func (a *V1ApiService) GetComputeEnv(ctx context.Context) (*GetComputeEnvResponse, error)
V1ApiService
@return *GetComputeEnvResponse
func (*V1ApiService) GetContainerRegistry ¶
func (a *V1ApiService) GetContainerRegistry(ctx context.Context) (*GetContainerRegistryResponse, error)
V1ApiService
@return *GetContainerRegistryResponse
func (*V1ApiService) GetDockerEnv ¶
func (a *V1ApiService) GetDockerEnv(ctx context.Context) (*GetDockerEnvResponse, error)
V1ApiService
@return *GetDockerEnvResponse
func (*V1ApiService) GetObjectstorageBucket ¶
func (a *V1ApiService) GetObjectstorageBucket(ctx context.Context) (*GetObjsBucketResponse, error)
V1ApiService
@return *GetObjsBucketResponse
func (*V1ApiService) GetOsEnv ¶
func (a *V1ApiService) GetOsEnv(ctx context.Context) (*GetOsEnvResponse, error)
V1ApiService
@return *GetOsEnvResponse
func (*V1ApiService) GetProject ¶
func (a *V1ApiService) GetProject(ctx context.Context, projectId *string) (*GetProjectDetailResponse, error)
V1ApiService
@param projectId projectId @return *GetProjectDetailResponse
func (*V1ApiService) GetProjects ¶
func (a *V1ApiService) GetProjects(ctx context.Context, localVarOptionals map[string]interface{}) (*GetProjectListResponse, error)
V1ApiService
@param optional (nil or map[string]interface{}) with one or more of:
@param "pageNo" (string) Page No @param "pageSize" (string) Page Size @param "projectName" (string) Project Name
@return *GetProjectListResponse
func (*V1ApiService) GetRuntimeEnv ¶
func (a *V1ApiService) GetRuntimeEnv(ctx context.Context, osId *string) (*GetRuntimeEnvResponse, error)
V1ApiService
@param osId osId @return *GetRuntimeEnvResponse
func (*V1ApiService) GetRuntimeVersionEnv ¶
func (a *V1ApiService) GetRuntimeVersionEnv(ctx context.Context, osId *string, runtimeId *string) (*GetRuntimeVersionEnvResponse, error)
V1ApiService
@param osId osId @param runtimeId runtimeId @return *GetRuntimeVersionEnvResponse
func (*V1ApiService) GetSourcecommitRepositories ¶
func (a *V1ApiService) GetSourcecommitRepositories(ctx context.Context) (*GetScRepositoryResponse, error)
V1ApiService
@return *GetScRepositoryResponse
func (*V1ApiService) GetSourcecommitRepositoryBranches ¶
func (a *V1ApiService) GetSourcecommitRepositoryBranches(ctx context.Context, repositoryName *string) (*GetScBranchResponse, error)
V1ApiService
@param repositoryName repositoryName @return *GetScBranchResponse
func (*V1ApiService) StartBuild ¶
func (a *V1ApiService) StartBuild(ctx context.Context, projectId *string) (*StartBuildResponse, error)
V1ApiService
@param projectId projectId @return *StartBuildResponse
Source Files ¶
- api_client.go
- api_response.go
- cancel_build.go
- change_project.go
- configuration.go
- create_project.go
- create_project_response.go
- env_platform_config_request.go
- env_platform_config_request_os.go
- env_platform_config_request_runtime.go
- env_platform_config_request_runtime_version.go
- env_platform_config_response.go
- env_platform_config_response_os.go
- env_platform_config_response_runtime.go
- env_platform_config_response_runtime_version.go
- get_build_history_response.go
- get_build_history_response_history.go
- get_compute_env_response.go
- get_compute_env_response_compute.go
- get_container_registry_response.go
- get_container_registry_response_registry.go
- get_docker_env_response.go
- get_docker_env_response_docker.go
- get_objs_bucket_response.go
- get_objs_bucket_response_bucket.go
- get_os_env_response.go
- get_os_env_response_os.go
- get_project_detail_response.go
- get_project_detail_response_artifact.go
- get_project_detail_response_artifact_storage.go
- get_project_detail_response_created.go
- get_project_detail_response_env.go
- get_project_detail_response_env_compute.go
- get_project_detail_response_env_docker.go
- get_project_detail_response_env_platform.go
- get_project_detail_response_last_build.go
- get_project_detail_response_source.go
- get_project_detail_response_source_config.go
- get_project_list_response.go
- get_project_list_response_project.go
- get_runtime_env_response.go
- get_runtime_version_env_response.go
- get_sc_branch_response.go
- get_sc_repository_response.go
- get_sc_repository_response_repository.go
- project_artifact.go
- project_artifact_storage.go
- project_cache.go
- project_cmd.go
- project_cmd_dockerbuild.go
- project_env.go
- project_env_compute.go
- project_env_docker.go
- project_env_env_vars.go
- project_env_platform.go
- project_linked.go
- project_source.go
- project_source_config.go
- start_build_response.go
- v1_api.go