graph

package
v0.0.0-...-a4cbc72 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: AGPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchLogs

func FetchLogs(ctx context.Context, url string) (*model.Log, error)

func StartJobGroupUnsafe

func StartJobGroupUnsafe(ctx context.Context, tx *sql.Tx, id, ownerID int) error

Starts a job group. Does not authenticate the user.

func SubmitJob

func SubmitJob(ctx context.Context, jobID int, manifest *Manifest) error

Types

type Manifest

type Manifest struct {
	Arch         *string                `yaml:"arch",json:"arch,omitempty"`
	Artifacts    []string               `yaml:"artifacts",json:"artifacts,omitempty"`
	Environment  map[string]interface{} `yaml:"environment",json:"environment,omitempty"`
	Image        string                 `yaml:"image",json:"image"`
	Packages     []string               `yaml:"packages",json:"packages,omitempty"`
	Repositories map[string]string      `yaml:"repositories",json:"repositories,omitempty"`
	Secrets      []string               `yaml:"secrets",json:"secrets,omitempty"`
	Shell        bool                   `yaml:"shell",json:"shell,omitempty"`
	Sources      []string               `yaml:"sources",json:"sources,omitempty"`
	Tasks        []map[string]string    `yaml:"tasks",json:"tasks"`
	Triggers     []Trigger              `yaml:"triggers",json:"triggers,omitempty"`
	OAuth        string                 `yaml:"oauth",json:"oauth,omitempty"`
}

func LoadManifest

func LoadManifest(in string) (*Manifest, error)

type Resolver

type Resolver struct{}

func (*Resolver) Job

func (r *Resolver) Job() api.JobResolver

Job returns api.JobResolver implementation.

func (*Resolver) JobGroup

func (r *Resolver) JobGroup() api.JobGroupResolver

JobGroup returns api.JobGroupResolver implementation.

func (*Resolver) Mutation

func (r *Resolver) Mutation() api.MutationResolver

Mutation returns api.MutationResolver implementation.

func (*Resolver) PGPKey

func (r *Resolver) PGPKey() api.PGPKeyResolver

PGPKey returns api.PGPKeyResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() api.QueryResolver

Query returns api.QueryResolver implementation.

func (*Resolver) SSHKey

func (r *Resolver) SSHKey() api.SSHKeyResolver

SSHKey returns api.SSHKeyResolver implementation.

func (*Resolver) SecretFile

func (r *Resolver) SecretFile() api.SecretFileResolver

SecretFile returns api.SecretFileResolver implementation.

func (*Resolver) Task

func (r *Resolver) Task() api.TaskResolver

Task returns api.TaskResolver implementation.

func (*Resolver) User

func (r *Resolver) User() api.UserResolver

User returns api.UserResolver implementation.

func (*Resolver) UserWebhookSubscription

func (r *Resolver) UserWebhookSubscription() api.UserWebhookSubscriptionResolver

UserWebhookSubscription returns api.UserWebhookSubscriptionResolver implementation.

func (*Resolver) WebhookDelivery

func (r *Resolver) WebhookDelivery() api.WebhookDeliveryResolver

WebhookDelivery returns api.WebhookDeliveryResolver implementation.

type Trigger

type Trigger struct {
	Action    string `yaml:"action",json:"action"`
	Condition string `yaml:"condition",json:"condition"`

	// Email fields
	To        *string `yaml:"to",json:"to,omitempty"`
	Cc        *string `yaml:"cc",json:"cc,omitempty"`
	InReplyTo *string `yaml:"in_reply_to",json:"in_reply_to,omitempty"`

	// Webhook fields
	Url *string `yaml:"url",json:"url"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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