sourcebuild

package
v1.6.11 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT, MIT Imports: 24 Imported by: 0

README

Go API client for sourcebuild

<br/>https://sourcebuild.apigw.ntruss.com/api/v1

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 2022-04-22T08:24:50Z
  • Package version:
  • Build package: io.swagger.codegen.languages.NcpGoForVnksClientCodegen

Installation

Put the package under your project folder and add the following in import:

"./sourcebuild"

Documentation for API Endpoints

All URIs are relative to https://sourcebuild.apigw.ntruss.com/api/v1

Class Method HTTP request Description
V1Api GetContainerRegistry Get /containerregistry/registry
V1Api GetEnvCompute Get /env/compute
V1Api GetEnvDocker Get /env/docker
V1Api GetEnvOs Get /env/os
V1Api GetEnvRuntime Get /env/os/{osId}/runtime
V1Api GetEnvRuntimeVersion Get /env/os/{osId}/runtime/{runtimeId}/version
V1Api GetObjectstorageBucket Get /objectstorage/bucket
V1Api GetProjects Get /project
V1Api CreateProject Post /project
V1Api CancelBuild Delete /project/{projectId}/build
V1Api StartBuild Post /project/{projectId}/build
V1Api DeleteProject Delete /project/{projectId}
V1Api GetProject Get /project/{projectId}
V1Api GetBuildHistory Get /project/{projectId}/history
V1Api ChangeProject Patch /project/{projectId}
V1Api GetSourcecommitRepositories Get /sourcecommit/repository
V1Api GetSourcecommitRepositoryBranches Get /sourcecommit/repository/{repositoryName}/branch

Documentation For Models

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

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

func (c *APIClient) ChangeBasePath(path string)

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 CreateProjectResponse struct {
	Id *int32 `json:"id,omitempty"`

	Name *string `json:"name,omitempty"`
}

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 EnvPlatformConfigResponseOs

type EnvPlatformConfigResponseOs struct {
	Id *int32 `json:"id,omitempty"`

	Name *string `json:"name,omitempty"`

	Version *string `json:"version,omitempty"`

	Archi *string `json:"archi,omitempty"`
}

type EnvPlatformConfigResponseRuntime

type EnvPlatformConfigResponseRuntime struct {
	Id *int32 `json:"id,omitempty"`

	Name *string `json:"name,omitempty"`

	Version *EnvPlatformConfigResponseRuntimeVersion `json:"version,omitempty"`
}

type EnvPlatformConfigResponseRuntimeVersion

type EnvPlatformConfigResponseRuntimeVersion struct {
	Id *int32 `json:"id,omitempty"`

	Name *string `json:"name,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 GetComputeEnvResponseCompute

type GetComputeEnvResponseCompute struct {
	Id *int32 `json:"id,omitempty"`

	Cpu *int32 `json:"cpu,omitempty"`

	Mem *int32 `json:"mem,omitempty"`
}

type GetContainerRegistryResponse

type GetContainerRegistryResponse struct {
	Registry []*GetContainerRegistryResponseRegistry `json:"registry,omitempty"`
}

type GetContainerRegistryResponseRegistry

type GetContainerRegistryResponseRegistry struct {
	Name *string `json:"name,omitempty"`

	Status *string `json:"status,omitempty"`

	Permission *string `json:"permission,omitempty"`

	ActionName *string `json:"actionName,omitempty"`

	Disabled *bool `json:"disabled,omitempty"`
}

type GetDockerEnvResponse

type GetDockerEnvResponse struct {
	Docker []*GetDockerEnvResponseDocker `json:"docker,omitempty"`
}

type GetDockerEnvResponseDocker

type GetDockerEnvResponseDocker struct {
	Id *int32 `json:"id,omitempty"`

	Name *string `json:"name,omitempty"`
}

type GetObjsBucketResponse

type GetObjsBucketResponse struct {
	Bucket []*GetObjsBucketResponseBucket `json:"bucket,omitempty"`
}

type GetObjsBucketResponseBucket

type GetObjsBucketResponseBucket struct {
	Name *string `json:"name,omitempty"`

	Permission *string `json:"permission,omitempty"`

	ActionName *string `json:"actionName,omitempty"`

	CreationTime *int32 `json:"creationTime,omitempty"`

	Disabled *bool `json:"disabled,omitempty"`
}

type GetOsEnvResponse

type GetOsEnvResponse struct {
	Os []*GetOsEnvResponseOs `json:"os,omitempty"`
}

type GetOsEnvResponseOs

type GetOsEnvResponseOs struct {
	Id *int32 `json:"id,omitempty"`

	Name *string `json:"name,omitempty"`

	Version *string `json:"version,omitempty"`

	Archi *string `json:"archi,omitempty"`
}

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 GetProjectDetailResponseArtifactStorage

type GetProjectDetailResponseArtifactStorage struct {
	Bucket *string `json:"bucket,omitempty"`

	Path *string `json:"path,omitempty"`

	Filename *string `json:"filename,omitempty"`
}

type GetProjectDetailResponseCreated

type GetProjectDetailResponseCreated struct {
	Timestamp *int64 `json:"timestamp,omitempty"`

	User *string `json:"user,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 GetProjectDetailResponseEnvCompute

type GetProjectDetailResponseEnvCompute struct {
	Id *int32 `json:"id,omitempty"`

	Cpu *int32 `json:"cpu,omitempty"`

	Mem *int32 `json:"mem,omitempty"`
}

type GetProjectDetailResponseEnvDocker

type GetProjectDetailResponseEnvDocker struct {
	Id *int32 `json:"id,omitempty"`

	Use *bool `json:"use,omitempty"`

	Name *string `json:"name,omitempty"`
}

type GetProjectDetailResponseEnvPlatform

type GetProjectDetailResponseEnvPlatform struct {
	Type_ *string `json:"type,omitempty"`

	Config *EnvPlatformConfigResponse `json:"config,omitempty"`
}

type GetProjectDetailResponseLastBuild

type GetProjectDetailResponseLastBuild struct {
	Id *string `json:"id,omitempty"`

	Timestamp *int64 `json:"timestamp,omitempty"`

	Status *string `json:"status,omitempty"`
}

type GetProjectDetailResponseSource

type GetProjectDetailResponseSource struct {
	Type_ *string `json:"type,omitempty"`

	Config *GetProjectDetailResponseSourceConfig `json:"config,omitempty"`
}

type GetProjectDetailResponseSourceConfig

type GetProjectDetailResponseSourceConfig struct {
	Repository *string `json:"repository,omitempty"`

	Branch *string `json:"branch,omitempty"`
}

type GetProjectListResponse

type GetProjectListResponse struct {
	Total *int32 `json:"total,omitempty"`

	Project []*GetProjectListResponseProject `json:"project,omitempty"`
}

type GetProjectListResponseProject

type GetProjectListResponseProject struct {
	Id *int32 `json:"id,omitempty"`

	Name *string `json:"name,omitempty"`

	Permission *string `json:"permission,omitempty"`

	ActionName *string `json:"actionName,omitempty"`
}

type GetRuntimeEnvResponse

type GetRuntimeEnvResponse struct {
	Runtime []*GetDockerEnvResponseDocker `json:"runtime,omitempty"`
}

type GetRuntimeVersionEnvResponse

type GetRuntimeVersionEnvResponse struct {
	Version []*GetDockerEnvResponseDocker `json:"version,omitempty"`
}

type GetScBranchResponse

type GetScBranchResponse struct {
	Default_ *string `json:"default,omitempty"`

	Branch []*string `json:"branch,omitempty"`
}

type GetScRepositoryResponse

type GetScRepositoryResponse struct {
	Repository []*GetScRepositoryResponseRepository `json:"repository,omitempty"`
}

type GetScRepositoryResponseRepository

type GetScRepositoryResponseRepository struct {
	Name *string `json:"name,omitempty"`

	Permission *string `json:"permission,omitempty"`

	ActionName *string `json:"actionName,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 ProjectArtifactStorage struct {
	Bucket *string `json:"bucket"`

	Path *string `json:"path"`

	Filename *string `json:"filename"`
}

type ProjectCache

type ProjectCache struct {
	Use *bool `json:"use,omitempty"`

	Registry *string `json:"registry,omitempty"`

	Image *string `json:"image,omitempty"`

	Tag *string `json:"tag,omitempty"`

	Latest *bool `json:"latest,omitempty"`
}

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 ProjectCmdDockerbuild struct {
	Use *bool `json:"use,omitempty"`

	Dockerfile *string `json:"dockerfile,omitempty"`

	Registry *string `json:"registry,omitempty"`

	Image *string `json:"image,omitempty"`

	Tag *string `json:"tag,omitempty"`

	Latest *bool `json:"latest,omitempty"`
}

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 ProjectEnvDocker struct {
	Use *bool `json:"use,omitempty"`

	Id *int32 `json:"id,omitempty"`
}

type ProjectEnvEnvVars

type ProjectEnvEnvVars struct {
	Key *string `json:"key,omitempty"`

	Value *string `json:"value,omitempty"`
}

type ProjectEnvPlatform

type ProjectEnvPlatform struct {
	Type_ *string `json:"type"`

	Config *EnvPlatformConfigRequest `json:"config"`
}

type ProjectLinked

type ProjectLinked struct {
	CloudLogAnalytics *bool `json:"CloudLogAnalytics,omitempty"`

	FileSafer *bool `json:"FileSafer,omitempty"`
}

type ProjectSource

type ProjectSource struct {
	Type_ *string `json:"type"`

	Config *ProjectSourceConfig `json:"config"`
}

type ProjectSourceConfig

type ProjectSourceConfig struct {
	Repository *string `json:"repository"`

	Branch *string `json:"branch"`
}

type StartBuildResponse

type StartBuildResponse struct {
	Id *int32 `json:"id,omitempty"`

	BuildId *string `json:"buildId,omitempty"`
}

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

Jump to

Keyboard shortcuts

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