gaia: github.com/gaia-pipeline/gaia Index | Files | Directories

package gaia

import "github.com/gaia-pipeline/gaia"

Index

Package Files

gaia.go

Constants

const (
    // PTypeUnknown unknown plugin type
    PTypeUnknown PipelineType = "unknown"

    // PTypeGolang golang plugin type
    PTypeGolang PipelineType = "golang"

    // CreatePipelineFailed status
    CreatePipelineFailed CreatePipelineType = "failed"

    // CreatePipelineRunning status
    CreatePipelineRunning CreatePipelineType = "running"

    // CreatePipelineSuccess status
    CreatePipelineSuccess CreatePipelineType = "success"

    // RunNotScheduled status
    RunNotScheduled PipelineRunStatus = "not scheduled"

    // RunScheduled status
    RunScheduled PipelineRunStatus = "scheduled"

    // RunFailed status
    RunFailed PipelineRunStatus = "failed"

    // RunSuccess status
    RunSuccess PipelineRunStatus = "success"

    // RunRunning status
    RunRunning PipelineRunStatus = "running"

    // JobWaitingExec status
    JobWaitingExec JobStatus = "waiting for execution"

    // JobSuccess status
    JobSuccess JobStatus = "success"

    // JobFailed status
    JobFailed JobStatus = "failed"

    // JobRunning status
    JobRunning JobStatus = "running"

    // LogsFolderName represents the Name of the logs folder in pipeline run folder
    LogsFolderName = "logs"

    // LogsFileName represents the file name of the logs output
    LogsFileName = "output.log"
)

type Config Uses

type Config struct {
    DevMode           bool
    VersionSwitch     bool
    Poll              bool
    PVal              int
    ListenPort        string
    HomePath          string
    DataPath          string
    PipelinePath      string
    WorkspacePath     string
    Worker            string
    JwtPrivateKeyPath string
    JWTKey            interface{}
    Logger            hclog.Logger

    Bolt struct {
        Mode os.FileMode
    }
}

Config holds all config options

var Cfg *Config

Cfg represents the global config instance

type CreatePipeline Uses

type CreatePipeline struct {
    ID         string             `json:"id,omitempty"`
    Pipeline   Pipeline           `json:"pipeline,omitempty"`
    Status     int                `json:"status,omitempty"`
    StatusType CreatePipelineType `json:"statustype,omitempty"`
    Output     string             `json:"output,omitempty"`
    Created    time.Time          `json:"created,omitempty"`
}

CreatePipeline represents a pipeline which is not yet compiled.

type CreatePipelineType Uses

type CreatePipelineType string

CreatePipelineType represents the different status types a create pipeline can have.

type GitRepo Uses

type GitRepo struct {
    URL            string     `json:"url,omitempty"`
    Username       string     `json:"user,omitempty"`
    Password       string     `json:"password,omitempty"`
    PrivateKey     PrivateKey `json:"privatekey,omitempty"`
    SelectedBranch string     `json:"selectedbranch,omitempty"`
    Branches       []string   `json:"branches,omitempty"`
    LocalDest      string
}

GitRepo represents a single git repository

type Job Uses

type Job struct {
    ID          uint32    `json:"id,omitempty"`
    Title       string    `json:"title,omitempty"`
    Description string    `json:"desc,omitempty"`
    Priority    int64     `json:"priority"`
    Status      JobStatus `json:"status,omitempty"`
}

Job represents a single job of a pipeline

type JobStatus Uses

type JobStatus string

JobStatus represents the different status a job can have.

type Pipeline Uses

type Pipeline struct {
    ID        int          `json:"id,omitempty"`
    Name      string       `json:"name,omitempty"`
    Repo      GitRepo      `json:"repo,omitempty"`
    Type      PipelineType `json:"type,omitempty"`
    ExecPath  string       `json:"execpath,omitempty"`
    SHA256Sum []byte       `json:"sha256sum,omitempty"`
    Jobs      []Job        `json:"jobs,omitempty"`
    Created   time.Time    `json:"created,omitempty"`
    UUID      string       `json:"uuid,omitempty"`
}

Pipeline represents a single pipeline

type PipelineRun Uses

type PipelineRun struct {
    UniqueID     string            `json:"uniqueid"`
    ID           int               `json:"id"`
    PipelineID   int               `json:"pipelineid"`
    StartDate    time.Time         `json:"startdate,omitempty"`
    FinishDate   time.Time         `json:"finishdate,omitempty"`
    ScheduleDate time.Time         `json:"scheduledate,omitempty"`
    Status       PipelineRunStatus `json:"status,omitempty"`
    Jobs         []Job             `json:"jobs,omitempty"`
}

PipelineRun represents a single run of a pipeline.

type PipelineRunStatus Uses

type PipelineRunStatus string

PipelineRunStatus represents the different status a run can have.

type PipelineType Uses

type PipelineType string

PipelineType represents supported plugin types

func (PipelineType) String Uses

func (p PipelineType) String() string

String returns a pipeline type string back

type PrivateKey Uses

type PrivateKey struct {
    Key      string `json:"key,omitempty"`
    Username string `json:"username,omitempty"`
    Password string `json:"password,omitempty"`
}

PrivateKey represents a pem encoded private key

type User Uses

type User struct {
    Username    string    `json:"username,omitempty"`
    Password    string    `json:"password,omitempty"`
    DisplayName string    `json:"display_name,omitempty"`
    Tokenstring string    `json:"tokenstring,omitempty"`
    JwtExpiry   int64     `json:"jwtexpiry,omitempty"`
    LastLogin   time.Time `json:"lastlogin,omitempty"`
}

User is the user object

Directories

PathSynopsis
cmd/gaia
handlers
pipeline
plugin
scheduler
store

Package gaia imports 3 packages (graph) and is imported by 6 packages. Updated 2018-07-21. Refresh now. Tools for package owners.