actionsdk

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	BuildID       string `json:"build_id"`
	JobID         string `json:"job_id"`
	StepSlug      string `json:"step_slug"`
	ArtifactID    string `json:"id"`
	Module        string `json:"module"`
	Type          string `json:"type"`
	Name          string `json:"name"`
	Path          string `json:"path"`
	Format        string `json:"format"`
	FormatVersion string `json:"format_version"`
	SHA256        string `json:"sha256"`
}

type ArtifactDownloadByteArrayRequest

type ArtifactDownloadByteArrayRequest struct {
	ID string `json:"id"`
}

type ArtifactDownloadByteArrayResult

type ArtifactDownloadByteArrayResult struct {
	Bytes []byte
	Hash  string
	Size  int64
}

type ArtifactDownloadRequest

type ArtifactDownloadRequest struct {
	ID         string `json:"id"`
	TargetFile string `json:"target_file"`
}

type ArtifactDownloadResult

type ArtifactDownloadResult struct {
	Path string
	Hash string
	Size int64
}

type ArtifactListRequest

type ArtifactListRequest struct {
	Query string `json:"query"`
}

type ArtifactUploadRequest

type ArtifactUploadRequest struct {
	File          string `json:"file"`
	Content       string `json:"content"`
	ContentBytes  []byte `json:"content_bytes"`
	Module        string `json:"module"`
	Type          string `json:"type"`
	Format        string `json:"format"`
	FormatVersion string `json:"format_version"`
	ExtractFile   bool   `json:"extract_file"`
}

func (ArtifactUploadRequest) ModuleSlug

func (r ArtifactUploadRequest) ModuleSlug() string

type ConfigV1Response

type ConfigV1Response struct {
	Debug        bool              `json:"debug,omitempty"`
	Log          map[string]string `json:"log,omitempty"`
	ProjectDir   string            `json:"project_dir,omitempty"`
	TempDir      string            `json:"temp_dir,omitempty"`
	ArtifactDir  string            `json:"artifact_dir,omitempty"`
	HostName     string            `json:"host_name,omitempty"`
	HostUserId   string            `json:"host_user_id,omitempty"`
	HostUserName string            `json:"host_user_name,omitempty"`
	HostGroupId  string            `json:"host_group_id,omitempty"`
	Config       string            `json:"config,omitempty"`
}

type DeploymentV1Response

type DeploymentV1Response struct {
	DeploymentType        string            `json:"deployment_type"`
	DeploymentSpec        string            `json:"deployment_spec"`
	DeploymentEnvironment string            `json:"deployment_environment"`
	DeploymentFile        string            `json:"deployment_file"`
	Properties            map[string]string `json:"properties"`
}

type EnvironmentV1Response

type EnvironmentV1Response struct {
	Env map[string]string `json:"env"`
}

type ExecuteCommandV1Request

type ExecuteCommandV1Request struct {
	CaptureOutput      bool              `json:"capture_output,omitempty"`       // CaptureOutput capture and return both stdout and stderr
	HideStdout         bool              `json:"hide_stdout,omitempty"`          // HideStdout hide the stdout output
	HideStderr         bool              `json:"hide_stderr,omitempty"`          // HideStderr hide the stderr output
	Command            string            `json:"command,omitempty"`              // Command
	WorkDir            string            `json:"work_dir,omitempty"`             // WorkDir directory to execute the command in (default = project root)
	Env                map[string]string `json:"env,omitempty"`                  // Env contains additional env properties
	Ports              []int             `json:"ports,omitempty"`                // Ports that will be exposed
	Constraint         string            `json:"constraint,omitempty"`           // A version Constraint for the binary used in command
	HideStandardOutput bool              `json:"hide_standard_output,omitempty"` // HideStandardOutput hide the standard output (stdout)
	HideStandardError  bool              `json:"hide_standard_error,omitempty"`  // HideStandardError hide the standard error (stderr)
}

type ExecuteCommandV1Response

type ExecuteCommandV1Response struct {
	// Code command exit code
	Code int `json:"code,omitempty"`

	// Command the command being executed
	Command string `json:"command,omitempty"`

	// Dir directory the command is executed in
	Dir string `json:"dir,omitempty"`

	// Error error message
	Error string `json:"error,omitempty"`

	// Stderr error output (if capture-output was request, empty otherwise)
	Stderr string `json:"stderr,omitempty"`

	// Stdout standard output (if capture-output was request, empty otherwise)
	Stdout string `json:"stdout,omitempty"`
}

type File

type File struct {
	Path      string `json:"path"`
	Directory string `json:"dir"`
	Name      string `json:"name"`
	NameShort string `json:"name_short"`
	Extension string `json:"ext"`
}

func NewFile

func NewFile(path string) File

type FileV1Request

type FileV1Request struct {
	Directory  string   `json:"dir"`
	Extensions []string `json:"ext"`
}

type HealthV1Response

type HealthV1Response struct {
	Status string `json:"status"`
}

type LogV1Request

type LogV1Request struct {
	Level   string                 `json:"level"`
	Message string                 `json:"message"`
	Context map[string]interface{} `json:"context"`
}

type MockSDKClient

type MockSDKClient struct {
	mock.Mock
}

MockSDKClient is an autogenerated mock type for the SDKClient type

func NewMockSDKClient

func NewMockSDKClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSDKClient

NewMockSDKClient creates a new instance of MockSDKClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockSDKClient) ArtifactByIdV1

func (_mock *MockSDKClient) ArtifactByIdV1(id string) (*Artifact, error)

ArtifactByIdV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) ArtifactDownloadByteArrayV1

func (_mock *MockSDKClient) ArtifactDownloadByteArrayV1(request ArtifactDownloadByteArrayRequest) (*ArtifactDownloadByteArrayResult, error)

ArtifactDownloadByteArrayV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) ArtifactDownloadV1

func (_mock *MockSDKClient) ArtifactDownloadV1(request ArtifactDownloadRequest) (*ArtifactDownloadResult, error)

ArtifactDownloadV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) ArtifactListV1

func (_mock *MockSDKClient) ArtifactListV1(request ArtifactListRequest) ([]*Artifact, error)

ArtifactListV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) ArtifactUploadV1

func (_mock *MockSDKClient) ArtifactUploadV1(request ArtifactUploadRequest) (string, string, error)

ArtifactUploadV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) ConfigV1

func (_mock *MockSDKClient) ConfigV1() (*ConfigV1Response, error)

ConfigV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) DeploymentV1

func (_mock *MockSDKClient) DeploymentV1() (*DeploymentV1Response, error)

DeploymentV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) EXPECT

func (_m *MockSDKClient) EXPECT() *MockSDKClient_Expecter

func (*MockSDKClient) EnvironmentV1

func (_mock *MockSDKClient) EnvironmentV1() (*EnvironmentV1Response, error)

EnvironmentV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) ExecuteCommandV1

func (_mock *MockSDKClient) ExecuteCommandV1(req ExecuteCommandV1Request) (*ExecuteCommandV1Response, error)

ExecuteCommandV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) FileCopyV1

func (_mock *MockSDKClient) FileCopyV1(old string, new string) error

FileCopyV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) FileExistsV1

func (_mock *MockSDKClient) FileExistsV1(file string) bool

FileExistsV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) FileListV1

func (_mock *MockSDKClient) FileListV1(req FileV1Request) ([]File, error)

FileListV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) FileReadV1

func (_mock *MockSDKClient) FileReadV1(file string) (string, error)

FileReadV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) FileRemoveV1

func (_mock *MockSDKClient) FileRemoveV1(file string) error

FileRemoveV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) FileRenameV1

func (_mock *MockSDKClient) FileRenameV1(old string, new string) error

FileRenameV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) FileWriteV1

func (_mock *MockSDKClient) FileWriteV1(file string, content []byte) error

FileWriteV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) HealthV1

func (_mock *MockSDKClient) HealthV1() (HealthV1Response, error)

HealthV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) LogV1

func (_mock *MockSDKClient) LogV1(req LogV1Request) error

LogV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) ModuleCurrentV1

func (_mock *MockSDKClient) ModuleCurrentV1() (*ProjectModule, error)

ModuleCurrentV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) ModuleExecutionContextV1

func (_mock *MockSDKClient) ModuleExecutionContextV1() (*ModuleExecutionContextV1Response, error)

ModuleExecutionContextV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) ModuleListV1

func (_mock *MockSDKClient) ModuleListV1() ([]*ProjectModule, error)

ModuleListV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) ProjectExecutionContextV1

func (_mock *MockSDKClient) ProjectExecutionContextV1() (*ProjectExecutionContextV1Response, error)

ProjectExecutionContextV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) TARCreateV1

func (_mock *MockSDKClient) TARCreateV1(inputDirectory string, outputFile string) error

TARCreateV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) TARExtractV1

func (_mock *MockSDKClient) TARExtractV1(archiveFile string, outputDirectory string) error

TARExtractV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) UUIDV4

func (_mock *MockSDKClient) UUIDV4() string

UUIDV4 provides a mock function for the type MockSDKClient

func (*MockSDKClient) VCSCommitByHashV1

func (_mock *MockSDKClient) VCSCommitByHashV1(request VCSCommitByHashRequest) (*VCSCommit, error)

VCSCommitByHashV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) VCSCommitsV1

func (_mock *MockSDKClient) VCSCommitsV1(request VCSCommitsRequest) ([]*VCSCommit, error)

VCSCommitsV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) VCSDiffV1

func (_mock *MockSDKClient) VCSDiffV1(request VCSDiffRequest) ([]VCSDiff, error)

VCSDiffV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) VCSReleasesV1

func (_mock *MockSDKClient) VCSReleasesV1(request VCSReleasesRequest) ([]VCSRelease, error)

VCSReleasesV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) VCSTagsV1

func (_mock *MockSDKClient) VCSTagsV1() ([]VCSTag, error)

VCSTagsV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) ZIPCreateV1

func (_mock *MockSDKClient) ZIPCreateV1(inputDirectory string, outputFile string) error

ZIPCreateV1 provides a mock function for the type MockSDKClient

func (*MockSDKClient) ZIPExtractV1

func (_mock *MockSDKClient) ZIPExtractV1(archiveFile string, outputDirectory string) error

ZIPExtractV1 provides a mock function for the type MockSDKClient

type MockSDKClient_ArtifactByIdV1_Call

type MockSDKClient_ArtifactByIdV1_Call struct {
	*mock.Call
}

MockSDKClient_ArtifactByIdV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ArtifactByIdV1'

func (*MockSDKClient_ArtifactByIdV1_Call) Return

func (*MockSDKClient_ArtifactByIdV1_Call) Run

func (*MockSDKClient_ArtifactByIdV1_Call) RunAndReturn

type MockSDKClient_ArtifactDownloadByteArrayV1_Call

type MockSDKClient_ArtifactDownloadByteArrayV1_Call struct {
	*mock.Call
}

MockSDKClient_ArtifactDownloadByteArrayV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ArtifactDownloadByteArrayV1'

func (*MockSDKClient_ArtifactDownloadByteArrayV1_Call) Return

func (*MockSDKClient_ArtifactDownloadByteArrayV1_Call) Run

type MockSDKClient_ArtifactDownloadV1_Call

type MockSDKClient_ArtifactDownloadV1_Call struct {
	*mock.Call
}

MockSDKClient_ArtifactDownloadV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ArtifactDownloadV1'

func (*MockSDKClient_ArtifactDownloadV1_Call) Return

func (*MockSDKClient_ArtifactDownloadV1_Call) Run

func (*MockSDKClient_ArtifactDownloadV1_Call) RunAndReturn

type MockSDKClient_ArtifactListV1_Call

type MockSDKClient_ArtifactListV1_Call struct {
	*mock.Call
}

MockSDKClient_ArtifactListV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ArtifactListV1'

func (*MockSDKClient_ArtifactListV1_Call) Return

func (*MockSDKClient_ArtifactListV1_Call) Run

func (*MockSDKClient_ArtifactListV1_Call) RunAndReturn

type MockSDKClient_ArtifactUploadV1_Call

type MockSDKClient_ArtifactUploadV1_Call struct {
	*mock.Call
}

MockSDKClient_ArtifactUploadV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ArtifactUploadV1'

func (*MockSDKClient_ArtifactUploadV1_Call) Return

func (*MockSDKClient_ArtifactUploadV1_Call) Run

func (*MockSDKClient_ArtifactUploadV1_Call) RunAndReturn

type MockSDKClient_ConfigV1_Call

type MockSDKClient_ConfigV1_Call struct {
	*mock.Call
}

MockSDKClient_ConfigV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfigV1'

func (*MockSDKClient_ConfigV1_Call) Return

func (*MockSDKClient_ConfigV1_Call) Run

func (*MockSDKClient_ConfigV1_Call) RunAndReturn

type MockSDKClient_DeploymentV1_Call

type MockSDKClient_DeploymentV1_Call struct {
	*mock.Call
}

MockSDKClient_DeploymentV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeploymentV1'

func (*MockSDKClient_DeploymentV1_Call) Return

func (*MockSDKClient_DeploymentV1_Call) Run

func (*MockSDKClient_DeploymentV1_Call) RunAndReturn

type MockSDKClient_EnvironmentV1_Call

type MockSDKClient_EnvironmentV1_Call struct {
	*mock.Call
}

MockSDKClient_EnvironmentV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnvironmentV1'

func (*MockSDKClient_EnvironmentV1_Call) Return

func (*MockSDKClient_EnvironmentV1_Call) Run

func (*MockSDKClient_EnvironmentV1_Call) RunAndReturn

type MockSDKClient_ExecuteCommandV1_Call

type MockSDKClient_ExecuteCommandV1_Call struct {
	*mock.Call
}

MockSDKClient_ExecuteCommandV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteCommandV1'

func (*MockSDKClient_ExecuteCommandV1_Call) Return

func (*MockSDKClient_ExecuteCommandV1_Call) Run

func (*MockSDKClient_ExecuteCommandV1_Call) RunAndReturn

type MockSDKClient_Expecter

type MockSDKClient_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockSDKClient_Expecter) ArtifactByIdV1

func (_e *MockSDKClient_Expecter) ArtifactByIdV1(id interface{}) *MockSDKClient_ArtifactByIdV1_Call

ArtifactByIdV1 is a helper method to define mock.On call

  • id string

func (*MockSDKClient_Expecter) ArtifactDownloadByteArrayV1

func (_e *MockSDKClient_Expecter) ArtifactDownloadByteArrayV1(request interface{}) *MockSDKClient_ArtifactDownloadByteArrayV1_Call

ArtifactDownloadByteArrayV1 is a helper method to define mock.On call

  • request ArtifactDownloadByteArrayRequest

func (*MockSDKClient_Expecter) ArtifactDownloadV1

func (_e *MockSDKClient_Expecter) ArtifactDownloadV1(request interface{}) *MockSDKClient_ArtifactDownloadV1_Call

ArtifactDownloadV1 is a helper method to define mock.On call

  • request ArtifactDownloadRequest

func (*MockSDKClient_Expecter) ArtifactListV1

func (_e *MockSDKClient_Expecter) ArtifactListV1(request interface{}) *MockSDKClient_ArtifactListV1_Call

ArtifactListV1 is a helper method to define mock.On call

  • request ArtifactListRequest

func (*MockSDKClient_Expecter) ArtifactUploadV1

func (_e *MockSDKClient_Expecter) ArtifactUploadV1(request interface{}) *MockSDKClient_ArtifactUploadV1_Call

ArtifactUploadV1 is a helper method to define mock.On call

  • request ArtifactUploadRequest

func (*MockSDKClient_Expecter) ConfigV1

ConfigV1 is a helper method to define mock.On call

func (*MockSDKClient_Expecter) DeploymentV1

DeploymentV1 is a helper method to define mock.On call

func (*MockSDKClient_Expecter) EnvironmentV1

EnvironmentV1 is a helper method to define mock.On call

func (*MockSDKClient_Expecter) ExecuteCommandV1

func (_e *MockSDKClient_Expecter) ExecuteCommandV1(req interface{}) *MockSDKClient_ExecuteCommandV1_Call

ExecuteCommandV1 is a helper method to define mock.On call

  • req ExecuteCommandV1Request

func (*MockSDKClient_Expecter) FileCopyV1

func (_e *MockSDKClient_Expecter) FileCopyV1(old interface{}, new interface{}) *MockSDKClient_FileCopyV1_Call

FileCopyV1 is a helper method to define mock.On call

  • old string
  • new string

func (*MockSDKClient_Expecter) FileExistsV1

func (_e *MockSDKClient_Expecter) FileExistsV1(file interface{}) *MockSDKClient_FileExistsV1_Call

FileExistsV1 is a helper method to define mock.On call

  • file string

func (*MockSDKClient_Expecter) FileListV1

func (_e *MockSDKClient_Expecter) FileListV1(req interface{}) *MockSDKClient_FileListV1_Call

FileListV1 is a helper method to define mock.On call

  • req FileV1Request

func (*MockSDKClient_Expecter) FileReadV1

func (_e *MockSDKClient_Expecter) FileReadV1(file interface{}) *MockSDKClient_FileReadV1_Call

FileReadV1 is a helper method to define mock.On call

  • file string

func (*MockSDKClient_Expecter) FileRemoveV1

func (_e *MockSDKClient_Expecter) FileRemoveV1(file interface{}) *MockSDKClient_FileRemoveV1_Call

FileRemoveV1 is a helper method to define mock.On call

  • file string

func (*MockSDKClient_Expecter) FileRenameV1

func (_e *MockSDKClient_Expecter) FileRenameV1(old interface{}, new interface{}) *MockSDKClient_FileRenameV1_Call

FileRenameV1 is a helper method to define mock.On call

  • old string
  • new string

func (*MockSDKClient_Expecter) FileWriteV1

func (_e *MockSDKClient_Expecter) FileWriteV1(file interface{}, content interface{}) *MockSDKClient_FileWriteV1_Call

FileWriteV1 is a helper method to define mock.On call

  • file string
  • content []byte

func (*MockSDKClient_Expecter) HealthV1

HealthV1 is a helper method to define mock.On call

func (*MockSDKClient_Expecter) LogV1

func (_e *MockSDKClient_Expecter) LogV1(req interface{}) *MockSDKClient_LogV1_Call

LogV1 is a helper method to define mock.On call

  • req LogV1Request

func (*MockSDKClient_Expecter) ModuleCurrentV1

ModuleCurrentV1 is a helper method to define mock.On call

func (*MockSDKClient_Expecter) ModuleExecutionContextV1

ModuleExecutionContextV1 is a helper method to define mock.On call

func (*MockSDKClient_Expecter) ModuleListV1

ModuleListV1 is a helper method to define mock.On call

func (*MockSDKClient_Expecter) ProjectExecutionContextV1

ProjectExecutionContextV1 is a helper method to define mock.On call

func (*MockSDKClient_Expecter) TARCreateV1

func (_e *MockSDKClient_Expecter) TARCreateV1(inputDirectory interface{}, outputFile interface{}) *MockSDKClient_TARCreateV1_Call

TARCreateV1 is a helper method to define mock.On call

  • inputDirectory string
  • outputFile string

func (*MockSDKClient_Expecter) TARExtractV1

func (_e *MockSDKClient_Expecter) TARExtractV1(archiveFile interface{}, outputDirectory interface{}) *MockSDKClient_TARExtractV1_Call

TARExtractV1 is a helper method to define mock.On call

  • archiveFile string
  • outputDirectory string

func (*MockSDKClient_Expecter) UUIDV4

UUIDV4 is a helper method to define mock.On call

func (*MockSDKClient_Expecter) VCSCommitByHashV1

func (_e *MockSDKClient_Expecter) VCSCommitByHashV1(request interface{}) *MockSDKClient_VCSCommitByHashV1_Call

VCSCommitByHashV1 is a helper method to define mock.On call

  • request VCSCommitByHashRequest

func (*MockSDKClient_Expecter) VCSCommitsV1

func (_e *MockSDKClient_Expecter) VCSCommitsV1(request interface{}) *MockSDKClient_VCSCommitsV1_Call

VCSCommitsV1 is a helper method to define mock.On call

  • request VCSCommitsRequest

func (*MockSDKClient_Expecter) VCSDiffV1

func (_e *MockSDKClient_Expecter) VCSDiffV1(request interface{}) *MockSDKClient_VCSDiffV1_Call

VCSDiffV1 is a helper method to define mock.On call

  • request VCSDiffRequest

func (*MockSDKClient_Expecter) VCSReleasesV1

func (_e *MockSDKClient_Expecter) VCSReleasesV1(request interface{}) *MockSDKClient_VCSReleasesV1_Call

VCSReleasesV1 is a helper method to define mock.On call

  • request VCSReleasesRequest

func (*MockSDKClient_Expecter) VCSTagsV1

VCSTagsV1 is a helper method to define mock.On call

func (*MockSDKClient_Expecter) ZIPCreateV1

func (_e *MockSDKClient_Expecter) ZIPCreateV1(inputDirectory interface{}, outputFile interface{}) *MockSDKClient_ZIPCreateV1_Call

ZIPCreateV1 is a helper method to define mock.On call

  • inputDirectory string
  • outputFile string

func (*MockSDKClient_Expecter) ZIPExtractV1

func (_e *MockSDKClient_Expecter) ZIPExtractV1(archiveFile interface{}, outputDirectory interface{}) *MockSDKClient_ZIPExtractV1_Call

ZIPExtractV1 is a helper method to define mock.On call

  • archiveFile string
  • outputDirectory string

type MockSDKClient_FileCopyV1_Call

type MockSDKClient_FileCopyV1_Call struct {
	*mock.Call
}

MockSDKClient_FileCopyV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileCopyV1'

func (*MockSDKClient_FileCopyV1_Call) Return

func (*MockSDKClient_FileCopyV1_Call) Run

func (*MockSDKClient_FileCopyV1_Call) RunAndReturn

func (_c *MockSDKClient_FileCopyV1_Call) RunAndReturn(run func(old string, new string) error) *MockSDKClient_FileCopyV1_Call

type MockSDKClient_FileExistsV1_Call

type MockSDKClient_FileExistsV1_Call struct {
	*mock.Call
}

MockSDKClient_FileExistsV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileExistsV1'

func (*MockSDKClient_FileExistsV1_Call) Return

func (*MockSDKClient_FileExistsV1_Call) Run

func (*MockSDKClient_FileExistsV1_Call) RunAndReturn

type MockSDKClient_FileListV1_Call

type MockSDKClient_FileListV1_Call struct {
	*mock.Call
}

MockSDKClient_FileListV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileListV1'

func (*MockSDKClient_FileListV1_Call) Return

func (*MockSDKClient_FileListV1_Call) Run

func (*MockSDKClient_FileListV1_Call) RunAndReturn

type MockSDKClient_FileReadV1_Call

type MockSDKClient_FileReadV1_Call struct {
	*mock.Call
}

MockSDKClient_FileReadV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileReadV1'

func (*MockSDKClient_FileReadV1_Call) Return

func (*MockSDKClient_FileReadV1_Call) Run

func (*MockSDKClient_FileReadV1_Call) RunAndReturn

func (_c *MockSDKClient_FileReadV1_Call) RunAndReturn(run func(file string) (string, error)) *MockSDKClient_FileReadV1_Call

type MockSDKClient_FileRemoveV1_Call

type MockSDKClient_FileRemoveV1_Call struct {
	*mock.Call
}

MockSDKClient_FileRemoveV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileRemoveV1'

func (*MockSDKClient_FileRemoveV1_Call) Return

func (*MockSDKClient_FileRemoveV1_Call) Run

func (*MockSDKClient_FileRemoveV1_Call) RunAndReturn

type MockSDKClient_FileRenameV1_Call

type MockSDKClient_FileRenameV1_Call struct {
	*mock.Call
}

MockSDKClient_FileRenameV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileRenameV1'

func (*MockSDKClient_FileRenameV1_Call) Return

func (*MockSDKClient_FileRenameV1_Call) Run

func (*MockSDKClient_FileRenameV1_Call) RunAndReturn

type MockSDKClient_FileWriteV1_Call

type MockSDKClient_FileWriteV1_Call struct {
	*mock.Call
}

MockSDKClient_FileWriteV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileWriteV1'

func (*MockSDKClient_FileWriteV1_Call) Return

func (*MockSDKClient_FileWriteV1_Call) Run

func (_c *MockSDKClient_FileWriteV1_Call) Run(run func(file string, content []byte)) *MockSDKClient_FileWriteV1_Call

func (*MockSDKClient_FileWriteV1_Call) RunAndReturn

func (_c *MockSDKClient_FileWriteV1_Call) RunAndReturn(run func(file string, content []byte) error) *MockSDKClient_FileWriteV1_Call

type MockSDKClient_HealthV1_Call

type MockSDKClient_HealthV1_Call struct {
	*mock.Call
}

MockSDKClient_HealthV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthV1'

func (*MockSDKClient_HealthV1_Call) Return

func (*MockSDKClient_HealthV1_Call) Run

func (*MockSDKClient_HealthV1_Call) RunAndReturn

type MockSDKClient_LogV1_Call

type MockSDKClient_LogV1_Call struct {
	*mock.Call
}

MockSDKClient_LogV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogV1'

func (*MockSDKClient_LogV1_Call) Return

func (*MockSDKClient_LogV1_Call) Run

func (*MockSDKClient_LogV1_Call) RunAndReturn

func (_c *MockSDKClient_LogV1_Call) RunAndReturn(run func(req LogV1Request) error) *MockSDKClient_LogV1_Call

type MockSDKClient_ModuleCurrentV1_Call

type MockSDKClient_ModuleCurrentV1_Call struct {
	*mock.Call
}

MockSDKClient_ModuleCurrentV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ModuleCurrentV1'

func (*MockSDKClient_ModuleCurrentV1_Call) Return

func (*MockSDKClient_ModuleCurrentV1_Call) Run

func (*MockSDKClient_ModuleCurrentV1_Call) RunAndReturn

type MockSDKClient_ModuleExecutionContextV1_Call

type MockSDKClient_ModuleExecutionContextV1_Call struct {
	*mock.Call
}

MockSDKClient_ModuleExecutionContextV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ModuleExecutionContextV1'

func (*MockSDKClient_ModuleExecutionContextV1_Call) Return

func (*MockSDKClient_ModuleExecutionContextV1_Call) Run

func (*MockSDKClient_ModuleExecutionContextV1_Call) RunAndReturn

type MockSDKClient_ModuleListV1_Call

type MockSDKClient_ModuleListV1_Call struct {
	*mock.Call
}

MockSDKClient_ModuleListV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ModuleListV1'

func (*MockSDKClient_ModuleListV1_Call) Return

func (*MockSDKClient_ModuleListV1_Call) Run

func (*MockSDKClient_ModuleListV1_Call) RunAndReturn

type MockSDKClient_ProjectExecutionContextV1_Call

type MockSDKClient_ProjectExecutionContextV1_Call struct {
	*mock.Call
}

MockSDKClient_ProjectExecutionContextV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProjectExecutionContextV1'

func (*MockSDKClient_ProjectExecutionContextV1_Call) Return

func (*MockSDKClient_ProjectExecutionContextV1_Call) Run

func (*MockSDKClient_ProjectExecutionContextV1_Call) RunAndReturn

type MockSDKClient_TARCreateV1_Call

type MockSDKClient_TARCreateV1_Call struct {
	*mock.Call
}

MockSDKClient_TARCreateV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TARCreateV1'

func (*MockSDKClient_TARCreateV1_Call) Return

func (*MockSDKClient_TARCreateV1_Call) Run

func (_c *MockSDKClient_TARCreateV1_Call) Run(run func(inputDirectory string, outputFile string)) *MockSDKClient_TARCreateV1_Call

func (*MockSDKClient_TARCreateV1_Call) RunAndReturn

func (_c *MockSDKClient_TARCreateV1_Call) RunAndReturn(run func(inputDirectory string, outputFile string) error) *MockSDKClient_TARCreateV1_Call

type MockSDKClient_TARExtractV1_Call

type MockSDKClient_TARExtractV1_Call struct {
	*mock.Call
}

MockSDKClient_TARExtractV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TARExtractV1'

func (*MockSDKClient_TARExtractV1_Call) Return

func (*MockSDKClient_TARExtractV1_Call) Run

func (_c *MockSDKClient_TARExtractV1_Call) Run(run func(archiveFile string, outputDirectory string)) *MockSDKClient_TARExtractV1_Call

func (*MockSDKClient_TARExtractV1_Call) RunAndReturn

func (_c *MockSDKClient_TARExtractV1_Call) RunAndReturn(run func(archiveFile string, outputDirectory string) error) *MockSDKClient_TARExtractV1_Call

type MockSDKClient_UUIDV4_Call

type MockSDKClient_UUIDV4_Call struct {
	*mock.Call
}

MockSDKClient_UUIDV4_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UUIDV4'

func (*MockSDKClient_UUIDV4_Call) Return

func (*MockSDKClient_UUIDV4_Call) Run

func (*MockSDKClient_UUIDV4_Call) RunAndReturn

func (_c *MockSDKClient_UUIDV4_Call) RunAndReturn(run func() string) *MockSDKClient_UUIDV4_Call

type MockSDKClient_VCSCommitByHashV1_Call

type MockSDKClient_VCSCommitByHashV1_Call struct {
	*mock.Call
}

MockSDKClient_VCSCommitByHashV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VCSCommitByHashV1'

func (*MockSDKClient_VCSCommitByHashV1_Call) Return

func (*MockSDKClient_VCSCommitByHashV1_Call) Run

func (*MockSDKClient_VCSCommitByHashV1_Call) RunAndReturn

type MockSDKClient_VCSCommitsV1_Call

type MockSDKClient_VCSCommitsV1_Call struct {
	*mock.Call
}

MockSDKClient_VCSCommitsV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VCSCommitsV1'

func (*MockSDKClient_VCSCommitsV1_Call) Return

func (*MockSDKClient_VCSCommitsV1_Call) Run

func (*MockSDKClient_VCSCommitsV1_Call) RunAndReturn

type MockSDKClient_VCSDiffV1_Call

type MockSDKClient_VCSDiffV1_Call struct {
	*mock.Call
}

MockSDKClient_VCSDiffV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VCSDiffV1'

func (*MockSDKClient_VCSDiffV1_Call) Return

func (*MockSDKClient_VCSDiffV1_Call) Run

func (*MockSDKClient_VCSDiffV1_Call) RunAndReturn

func (_c *MockSDKClient_VCSDiffV1_Call) RunAndReturn(run func(request VCSDiffRequest) ([]VCSDiff, error)) *MockSDKClient_VCSDiffV1_Call

type MockSDKClient_VCSReleasesV1_Call

type MockSDKClient_VCSReleasesV1_Call struct {
	*mock.Call
}

MockSDKClient_VCSReleasesV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VCSReleasesV1'

func (*MockSDKClient_VCSReleasesV1_Call) Return

func (*MockSDKClient_VCSReleasesV1_Call) Run

func (*MockSDKClient_VCSReleasesV1_Call) RunAndReturn

type MockSDKClient_VCSTagsV1_Call

type MockSDKClient_VCSTagsV1_Call struct {
	*mock.Call
}

MockSDKClient_VCSTagsV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VCSTagsV1'

func (*MockSDKClient_VCSTagsV1_Call) Return

func (*MockSDKClient_VCSTagsV1_Call) Run

func (*MockSDKClient_VCSTagsV1_Call) RunAndReturn

func (_c *MockSDKClient_VCSTagsV1_Call) RunAndReturn(run func() ([]VCSTag, error)) *MockSDKClient_VCSTagsV1_Call

type MockSDKClient_ZIPCreateV1_Call

type MockSDKClient_ZIPCreateV1_Call struct {
	*mock.Call
}

MockSDKClient_ZIPCreateV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ZIPCreateV1'

func (*MockSDKClient_ZIPCreateV1_Call) Return

func (*MockSDKClient_ZIPCreateV1_Call) Run

func (_c *MockSDKClient_ZIPCreateV1_Call) Run(run func(inputDirectory string, outputFile string)) *MockSDKClient_ZIPCreateV1_Call

func (*MockSDKClient_ZIPCreateV1_Call) RunAndReturn

func (_c *MockSDKClient_ZIPCreateV1_Call) RunAndReturn(run func(inputDirectory string, outputFile string) error) *MockSDKClient_ZIPCreateV1_Call

type MockSDKClient_ZIPExtractV1_Call

type MockSDKClient_ZIPExtractV1_Call struct {
	*mock.Call
}

MockSDKClient_ZIPExtractV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ZIPExtractV1'

func (*MockSDKClient_ZIPExtractV1_Call) Return

func (*MockSDKClient_ZIPExtractV1_Call) Run

func (_c *MockSDKClient_ZIPExtractV1_Call) Run(run func(archiveFile string, outputDirectory string)) *MockSDKClient_ZIPExtractV1_Call

func (*MockSDKClient_ZIPExtractV1_Call) RunAndReturn

func (_c *MockSDKClient_ZIPExtractV1_Call) RunAndReturn(run func(archiveFile string, outputDirectory string) error) *MockSDKClient_ZIPExtractV1_Call

type ModuleExecutionContextV1Response

type ModuleExecutionContextV1Response struct {
	ProjectDir string            `json:"project-dir"`
	Config     *ConfigV1Response `json:"config"`
	Env        map[string]string `json:"env"`
	Module     *ProjectModule
	Deployment *DeploymentV1Response
}

type ProjectDependency

type ProjectDependency struct {
	Id      string `json:"id,omitempty"`
	Type    string `json:"type,omitempty"`
	Version string `json:"version,omitempty"`
	Scope   string `json:"scope,omitempty"`
}

ProjectDependency defines model for ProjectDependency.

type ProjectExecutionContextV1Response

type ProjectExecutionContextV1Response struct {
	ProjectDir string            `json:"project-dir"`
	Config     *ConfigV1Response `json:"config"`
	Env        map[string]string `json:"env"`
	Modules    []*ProjectModule  `json:"modules"`
}

type ProjectModule

type ProjectModule struct {
	ProjectDir            string                   `json:"project_dir,omitempty"`            // ProjectDir project root directory
	ModuleDir             string                   `json:"module_dir,omitempty"`             // ModuleDir module root directory
	Discovery             []ProjectModuleDiscovery `json:"discovery,omitempty"`              // Discovery module detected based on
	Name                  string                   `json:"name,omitempty"`                   // Name module name
	Slug                  string                   `json:"slug,omitempty"`                   // Slug module name
	Type                  string                   `json:"type,omitempty"`                   // Type is the module type
	BuildSystem           string                   `json:"build_system,omitempty"`           // BuildSystem module name
	BuildSystemSyntax     string                   `json:"build_system_syntax,omitempty"`    // BuildSystemSyntax module name
	SpecificationType     string                   `json:"specification_type,omitempty"`     // SpecificationType is the type of the specification
	ConfigType            string                   `json:"config_type,omitempty"`            // ConfigType is the type of the configuration
	DeploymentSpec        string                   `json:"deployment_spec,omitempty"`        // DeploymentSpec is the kind of deployment specification
	DeploymentType        string                   `json:"deployment_type,omitempty"`        // DeploymentType is the type of the deployment
	DeploymentEnvironment string                   `json:"deployment_environment,omitempty"` // DeploymentEnvironment is the environment the deployment is for, e.g. staging, production, ...
	Language              map[string]string        `json:"language,omitempty"`               // Language module name
	Dependencies          []*ProjectDependency     `json:"dependencies,omitempty"`           // Dependencies module name
	Files                 []string                 `json:"files,omitempty"`                  // Files all files in the project directory
	Submodules            []*ProjectModule         `json:"submodules,omitempty"`             // Submodules submodules
}

ProjectModule defines model for ProjectModule.

func (*ProjectModule) HasDependencyByTypeAndId

func (module *ProjectModule) HasDependencyByTypeAndId(dependencyType string, dependencyId string) bool

type ProjectModuleDiscovery

type ProjectModuleDiscovery struct {
	File string `json:"file"`
}

ProjectModuleDiscovery contains info on the files used to discover the module

type SDKClient

type SDKClient interface {
	HealthV1() (HealthV1Response, error) // simple health check to verify connectivity and basic functionality of the SDK
	LogV1(req LogV1Request) error        // log a message with the given level and context (context is optional key-value pairs that can be included in the log)
	UUIDV4() string                      // UUID generates a new UUID string (useful for generating unique IDs for things like temporary files, correlation IDs, etc.)

	ConfigV1() (*ConfigV1Response, error)
	ProjectExecutionContextV1() (*ProjectExecutionContextV1Response, error)
	ModuleExecutionContextV1() (*ModuleExecutionContextV1Response, error)
	EnvironmentV1() (*EnvironmentV1Response, error)
	DeploymentV1() (*DeploymentV1Response, error)
	ModuleListV1() ([]*ProjectModule, error)
	ModuleCurrentV1() (*ProjectModule, error)

	ExecuteCommandV1(req ExecuteCommandV1Request) (*ExecuteCommandV1Response, error)

	VCSCommitsV1(request VCSCommitsRequest) ([]*VCSCommit, error)
	VCSCommitByHashV1(request VCSCommitByHashRequest) (*VCSCommit, error)
	VCSTagsV1() ([]VCSTag, error)
	VCSReleasesV1(request VCSReleasesRequest) ([]VCSRelease, error)
	VCSDiffV1(request VCSDiffRequest) ([]VCSDiff, error) // VCSDiff generates a diff between two VCS references (like commits or tags) and returns a list of changed files with their change types (added, modified, deleted).

	FileReadV1(file string) (string, error)                 // FileRead reads the content of the specified file and returns it as a string. It returns an error if the operation fails.
	FileWriteV1(file string, content []byte) error          // FileWrite writes the given content to the specified file. It returns an error if the operation fails.
	FileRemoveV1(file string) error                         // FileRemove removes the specified file. It returns an error if the operation fails.
	FileCopyV1(old string, new string) error                // FileCopy copies a file from old path to new path. It returns an error if the operation fails.
	FileRenameV1(old string, new string) error              // FileRename renames a file from old path to new path. It returns an error if the operation fails.
	FileListV1(req FileV1Request) (files []File, err error) // FileList lists files in a directory based on the given request parameters (like directory path and optional extensions filter). It returns a slice of files and an error if the operation fails.
	FileExistsV1(file string) bool                          // FileExists checks if the specified file exists and returns true if it does, false otherwise.

	ArtifactListV1(request ArtifactListRequest) ([]*Artifact, error)                                                // ArtifactList lists artifacts based on the given query expression (which can filter artifacts by their metadata). It returns a slice of artifacts that match the query and an error if the operation fails.
	ArtifactByIdV1(id string) (*Artifact, error)                                                                    // ArtifactById retrieves the artifact with the specified ID. It returns the artifact and an error if the operation fails or if the artifact is not found.
	ArtifactUploadV1(request ArtifactUploadRequest) (filePath string, fileHash string, err error)                   // ArtifactUpload uploads a file as an artifact with the specified metadata (like module, type, format, etc.). It returns the path of the stored artifact, its hash, and an error if the operation fails.
	ArtifactDownloadV1(request ArtifactDownloadRequest) (*ArtifactDownloadResult, error)                            // ArtifactDownload downloads the artifact with the specified ID to the target file path. It returns the path of the downloaded file, its hash, and size, or an error if the operation fails.
	ArtifactDownloadByteArrayV1(request ArtifactDownloadByteArrayRequest) (*ArtifactDownloadByteArrayResult, error) // ArtifactDownloadByteArray downloads the artifact with the specified ID and returns its content as a byte array along with its hash and size. It returns an error if the operation fails.

	ZIPCreateV1(inputDirectory string, outputFile string) error    // ZIPCreate creates a zip archive of the directory at the given path. It takes the input directory and the output file path for the zip archive. It returns an error if the operation fails.
	ZIPExtractV1(archiveFile string, outputDirectory string) error // ZIPExtract unzips the zip archive at the given path into the given directory. It takes the path of the zip archive and the target output directory. It returns an error if the operation fails.
	TARCreateV1(inputDirectory string, outputFile string) error    // TARCreate creates a tar archive of the directory at the given path. It takes the input directory and the output file path for the tar archive. It returns an error if the operation fails.
	TARExtractV1(archiveFile string, outputDirectory string) error // TARExtract extracts a tar archive at the given path into the given directory. It takes the path of the tar archive and the target output directory. It returns an error if the operation fails.
}

SDKClient defines the interface on how actions can interact with CID.

type VCSAuthor

type VCSAuthor struct {
	Name  string `json:"name,omitempty"`
	Email string `json:"email,omitempty"`
}

type VCSChange

type VCSChange struct {
	ChangeType string  `json:"type,omitempty"`
	FileFrom   VCSFile `json:"file_from,omitempty"`
	FileTo     VCSFile `json:"file_to,omitempty"`
	Patch      string  `json:"patch,omitempty"`
}

type VCSCommit

type VCSCommit struct {
	HashShort   string            `json:"hash_short,omitempty"`
	Hash        string            `json:"hash,omitempty"`
	Message     string            `json:"message,omitempty"`
	Description string            `json:"description,omitempty"`
	Author      VCSAuthor         `json:"author,omitempty"`
	Committer   VCSAuthor         `json:"committer,omitempty"`
	Tags        []*VCSTag         `json:"tags,omitempty"`
	AuthoredAt  time.Time         `json:"authored_at,omitempty"`
	CommittedAt time.Time         `json:"committed_at,omitempty"`
	Changes     []*VCSChange      `json:"changes,omitempty"`
	Context     map[string]string `json:"context,omitempty"`
}

type VCSCommitByHashRequest

type VCSCommitByHashRequest struct {
	Hash           string `json:"hash"`
	IncludeChanges bool   `json:"changes"`
}

type VCSCommitsRequest

type VCSCommitsRequest struct {
	FromHash       string `json:"from"`
	ToHash         string `json:"to"`
	IncludeChanges bool   `json:"changes"`
	Limit          int    `json:"limit"`
}

type VCSDiff

type VCSDiff struct {
	FileFrom VCSFile       `json:"file_from"`
	FileTo   VCSFile       `json:"file_to"`
	Lines    []VCSDiffLine `json:"lines,omitempty"`
}

type VCSDiffLine

type VCSDiffLine struct {
	Operation int    `json:"operation"`
	Content   string `json:"content"`
}

type VCSDiffRequest

type VCSDiffRequest struct {
	FromHash string `json:"from"`
	ToHash   string `json:"to"`
}

type VCSFile

type VCSFile struct {
	Name string `json:"name,omitempty"`
	Size int    `json:"size,omitempty"`
	Hash string `json:"hash,omitempty"`
}

type VCSRelease

type VCSRelease struct {
	Version string        `json:"version,omitempty"`
	Ref     vcsapi.VCSRef `json:"ref,omitempty"`
}

type VCSReleasesRequest

type VCSReleasesRequest struct {
	Type string `json:"type"` // Type of the release: stable, unstable
}

type VCSTag

type VCSTag struct {
	RefType string `json:"type,omitempty"`
	Value   string `json:"value,omitempty"`
	Hash    string `json:"hash,omitempty"`
}

Jump to

Keyboard shortcuts

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