codefresh

package
v0.0.0-...-2798f75 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContinueSync = "CONTINUE_SYNC"
	OneTimeSync  = "ONE_TIME_SYNC"
	SelectSync   = "SELECT"
	None         = "NONE"
)

Variables

This section is empty.

Functions

func BuildCodefreshSdk

func BuildCodefreshSdk(token string, host string) codefreshSdk.Codefresh

Types

type AgentApplication

type AgentApplication struct {
	Name      string `json:"name"`
	UID       string `json:"uid"`
	Project   string `json:"project"`
	Namespace string `json:"namespace"`
	Server    string `json:"server"`
}

type AgentProject

type AgentProject struct {
	Name string `json:"name"`
	UID  string `json:"uid"`
}

type Api

type Api struct {
	Integration string
	// contains filtered or unexported fields
}

func GetInstance

func GetInstance() *Api

func (*Api) CreateEnvironment

func (a *Api) CreateEnvironment(name string, project string, application string, namespace string) error

func (*Api) CreateIntegration

func (a *Api) CreateIntegration(name string, host string, username string, password string, token string, serverVersion string, provider string, clusterName string) error

func (*Api) DeleteEnvironment

func (a *Api) DeleteEnvironment(name string) error

func (*Api) GetDefaultGitContext

func (a *Api) GetDefaultGitContext() (error, *codefreshSdk.ContextPayload)

func (*Api) GetEnvironments

func (a *Api) GetEnvironments() ([]codefreshSdk.CFEnvironment, error)

func (*Api) GetGitContextByName

func (a *Api) GetGitContextByName(name string) (error, *codefreshSdk.ContextPayload)

func (*Api) GetGitContexts

func (a *Api) GetGitContexts() (error, *[]codefreshSdk.ContextPayload)

func (*Api) HeartBeat

func (a *Api) HeartBeat(error string) error

func (*Api) SendApplicationResources

func (a *Api) SendApplicationResources(resources *codefreshSdk.ApplicationResources) error

func (*Api) SendEnvironment

func (a *Api) SendEnvironment(environment codefreshSdk.Environment) (map[string]interface{}, error)

func (*Api) SendEvent

func (a *Api) SendEvent(name string, props map[string]string) error

func (*Api) SendResources

func (a *Api) SendResources(kind string, items interface{}, amount int) error

func (*Api) UpdateIntegration

func (a *Api) UpdateIntegration(name string, host string, username string, password string, token string, serverVersion string, provider string, clusterName string) error

type CodefreshApi

type CodefreshApi interface {
	CreateEnvironment(name string, project string, application string, namespace string) error
	GetDefaultGitContext() (error, *codefreshSdk.ContextPayload)
	DeleteEnvironment(name string) error
	SendResources(kind string, items interface{}, amount int) error
	SendEvent(name string, props map[string]string) error
	HeartBeat(error string) error
	GetEnvironments() ([]codefreshSdk.CFEnvironment, error)
	CreateIntegration(name string, host string, username string, password string, token string, serverVersion string, provider string, clusterName string) error
	UpdateIntegration(name string, host string, username string, password string, token string, serverVersion string, provider string, clusterName string) error
	SendEnvironment(environment codefreshSdk.Environment) (map[string]interface{}, error)
	SendApplicationResources(resources *codefreshSdk.ApplicationResources) error
	GetGitContextByName(name string) (error, *codefreshSdk.ContextPayload)
	GetGitContexts() (error, *[]codefreshSdk.ContextPayload)
}

type CodefreshError

type CodefreshError struct {
	Status  int         `json:"status"`
	Code    string      `json:"code"`
	Name    string      `json:"name"`
	Message string      `json:"message"`
	Context interface{} `json:"context"`
	URL     string
}

func (*CodefreshError) Error

func (e *CodefreshError) Error() string

Jump to

Keyboard shortcuts

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