codefresh

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: Apache-2.0 Imports: 7 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthOptions

type AuthOptions struct {

	// Token - Codefresh token
	Token string
}

AuthOptions

type ClietOptions

type ClietOptions struct {
	Auth AuthOptions

	Host string
}

Options

type Codefresh

type Codefresh interface {
	ITokenAPI
	IPipelineAPI
	// contains filtered or unexported methods
}

func New

func New(opt *ClietOptions) Codefresh

type IPipelineAPI

type IPipelineAPI interface {
	GetPipelines() []*Pipeline
	RunPipeline(string) string
}

IPipelineAPI declers Codefresh pipeline API

type ITokenAPI

type ITokenAPI interface {
	GenerateToken(name string, subject string) *Token
	GetTokens() []*Token
}

type Pipeline

type Pipeline struct {
	Metadata PipelineMetadata `json:"metadata"`
	Spec     PipelineSpec     `json:"spec"`
}

type PipelineMetadata

type PipelineMetadata struct {
	Name     string `json:"name"`
	IsPublic bool   `json:"isPublic"`
	Labels   struct {
		Tags []string `json:"tags"`
	} `json:"labels"`
	Deprecate struct {
		ApplicationPort string `json:"applicationPort"`
		RepoPipeline    bool   `json:"repoPipeline"`
	} `json:"deprecate"`
	OriginalYamlString string    `json:"originalYamlString"`
	AccountID          string    `json:"accountId"`
	CreatedAt          time.Time `json:"created_at"`
	UpdatedAt          time.Time `json:"updated_at"`
	Project            string    `json:"project"`
	ID                 string    `json:"id"`
}

type PipelineSpec

type PipelineSpec struct {
	Triggers []struct {
		Type     string   `json:"type"`
		Repo     string   `json:"repo"`
		Events   []string `json:"events"`
		Provider string   `json:"provider"`
		Context  string   `json:"context"`
	} `json:"triggers"`
	Contexts  []interface{} `json:"contexts"`
	Variables []struct {
		Key   string `json:"key"`
		Value string `json:"value"`
	} `json:"variables"`
	Steps  map[string]interface{} `json:"steps"`
	Stages []interface{}          `json:"stages"`
	Mode   string                 `json:"mode"`
}

type Token

type Token struct {
	ID          string    `json:"_id"`
	Name        string    `json:"name"`
	TokenPrefix string    `json:"tokenPrefix"`
	Created     time.Time `json:"created"`
	Subject     struct {
		Type string `json:"type"`
		Ref  string `json:"ref"`
	} `json:"subject"`
	Value string
}

Jump to

Keyboard shortcuts

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