model

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SECRET_PGPKEY = "pgp_key"
	SECRET_SSHKEY = "ssh_key"
	SECRET_FILE   = "plaintext_file"
)
View Source
const (
	TRIGGER_EMAIL   = "email"
	TRIGGER_WEBHOOK = "webhook"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	ID      int       `json:"id"`
	Created time.Time `json:"created"`
	Path    string    `json:"path"`
	Size    int       `json:"size"`
	URL     *string   `json:"url"`
	// contains filtered or unexported fields
}

func (*Artifact) Alias

func (a *Artifact) Alias() string

func (*Artifact) As

func (a *Artifact) As(alias string) *Artifact

func (*Artifact) Fields

func (a *Artifact) Fields() *database.ModelFields

func (*Artifact) Table

func (a *Artifact) Table() string

type EmailTrigger

type EmailTrigger struct {
	ID        int              `json:"id"`
	To        string           `json:"to"`
	Cc        string           `json:"cc"`
	InReplyTo string           `json:"in_reply_to"`
	Condition TriggerCondition `json:"condition"`
}

func (EmailTrigger) IsTrigger

func (EmailTrigger) IsTrigger()

type Job

type Job struct {
	ID       int       `json:"id"`
	Created  time.Time `json:"created"`
	Updated  time.Time `json:"updated"`
	Manifest string    `json:"manifest"`
	Note     *string   `json:"note"`
	Image    string    `json:"image"`
	Runner   *string   `json:"runner"`

	OwnerID    int
	JobGroupID *int
	RawTags    *string
	RawStatus  string
	// contains filtered or unexported fields
}

func (*Job) Alias

func (j *Job) Alias() string

func (*Job) As

func (j *Job) As(alias string) *Job

func (*Job) Fields

func (j *Job) Fields() *database.ModelFields

func (*Job) QueryWithCursor

func (j *Job) QueryWithCursor(ctx context.Context, runner sq.BaseRunner,
	q sq.SelectBuilder, cur *model.Cursor) ([]*Job, *model.Cursor)

func (*Job) Status

func (j *Job) Status() JobStatus

func (*Job) Table

func (j *Job) Table() string

func (*Job) Tags

func (j *Job) Tags() []string

type JobGroup

type JobGroup struct {
	ID      int       `json:"id"`
	Created time.Time `json:"created"`
	Note    *string   `json:"note"`

	OwnerID int
	// contains filtered or unexported fields
}

func (*JobGroup) Alias

func (j *JobGroup) Alias() string

func (*JobGroup) As

func (j *JobGroup) As(alias string) *JobGroup

func (*JobGroup) Fields

func (j *JobGroup) Fields() *database.ModelFields

func (*JobGroup) Table

func (j *JobGroup) Table() string

type PGPKey

type PGPKey struct {
	ID         int       `json:"id"`
	Created    time.Time `json:"created"`
	UUID       string    `json:"uuid"`
	Name       *string   `json:"name"`
	PrivateKey []byte    `json:"privateKey"`
}

func (PGPKey) IsSecret

func (PGPKey) IsSecret()

type RawSecret

type RawSecret struct {
	ID         int
	Created    time.Time
	UUID       string
	SecretType string
	Secret     []byte
	Name       *string
	Path       *string
	Mode       *int
	// contains filtered or unexported fields
}

func (*RawSecret) Alias

func (s *RawSecret) Alias() string

func (*RawSecret) As

func (s *RawSecret) As(alias string) *RawSecret

func (*RawSecret) Fields

func (s *RawSecret) Fields() *database.ModelFields

func (*RawSecret) QueryWithCursor

func (s *RawSecret) QueryWithCursor(ctx context.Context, runner sq.BaseRunner,
	q sq.SelectBuilder, cur *model.Cursor) ([]Secret, *model.Cursor)

func (*RawSecret) Table

func (s *RawSecret) Table() string

func (*RawSecret) ToSecret

func (s *RawSecret) ToSecret() Secret

type RawTrigger

type RawTrigger struct {
	ID          int
	Details     string
	Condition   string
	TriggerType string
	// contains filtered or unexported fields
}

func (*RawTrigger) Alias

func (t *RawTrigger) Alias() string

func (*RawTrigger) As

func (t *RawTrigger) As(alias string) *RawTrigger

func (*RawTrigger) Fields

func (t *RawTrigger) Fields() *database.ModelFields

func (*RawTrigger) Table

func (t *RawTrigger) Table() string

func (*RawTrigger) ToTrigger

func (t *RawTrigger) ToTrigger() Trigger

type SSHKey

type SSHKey struct {
	ID         int       `json:"id"`
	Created    time.Time `json:"created"`
	UUID       string    `json:"uuid"`
	Name       *string   `json:"name"`
	PrivateKey []byte    `json:"privateKey"`
}

func (SSHKey) IsSecret

func (SSHKey) IsSecret()

type Secret

type Secret interface {
	IsSecret()
}

type SecretFile

type SecretFile struct {
	ID      int       `json:"id"`
	Created time.Time `json:"created"`
	UUID    string    `json:"uuid"`
	Name    *string   `json:"name"`
	Path    string    `json:"path"`
	Mode    int       `json:"mode"`
	Data    []byte    `json:"data"`
}

func (SecretFile) IsSecret

func (SecretFile) IsSecret()

type Task

type Task struct {
	ID      int       `json:"id"`
	Created time.Time `json:"created"`
	Updated time.Time `json:"updated"`
	Name    string    `json:"name"`

	JobID     int
	RawStatus string
	Runner    *string
	// contains filtered or unexported fields
}

func (*Task) Alias

func (t *Task) Alias() string

func (*Task) As

func (t *Task) As(alias string) *Task

func (*Task) Fields

func (t *Task) Fields() *database.ModelFields

func (*Task) QueryWithCursor

func (t *Task) QueryWithCursor(ctx context.Context, runner sq.BaseRunner,
	q sq.SelectBuilder, cur *model.Cursor) ([]*Task, *model.Cursor)

func (*Task) Status

func (t *Task) Status() TaskStatus

func (*Task) Table

func (t *Task) Table() string

type Trigger

type Trigger interface {
	IsTrigger()
}

type User

type User struct {
	ID       int       `json:"id"`
	Created  time.Time `json:"created"`
	Updated  time.Time `json:"updated"`
	Username string    `json:"username"`
	Email    string    `json:"email"`
	URL      *string   `json:"url"`
	Location *string   `json:"location"`
	Bio      *string   `json:"bio"`
	// contains filtered or unexported fields
}

func (*User) Alias

func (u *User) Alias() string

func (*User) As

func (u *User) As(alias string) *User

func (User) CanonicalName

func (u User) CanonicalName() string

func (*User) Fields

func (u *User) Fields() *database.ModelFields

func (User) IsEntity

func (User) IsEntity()

func (*User) QueryWithCursor

func (u *User) QueryWithCursor(ctx context.Context, runner sq.BaseRunner,
	q sq.SelectBuilder, cur *model.Cursor) ([]*User, *model.Cursor)

func (*User) Table

func (u *User) Table() string

type UserWebhookSubscription

type UserWebhookSubscription struct {
	ID     int            `json:"id"`
	Events []WebhookEvent `json:"events"`
	Query  string         `json:"query"`
	URL    string         `json:"url"`

	UserID     int
	AuthMethod string
	ClientID   *string
	TokenHash  *string
	Expires    *time.Time
	Grants     *string
	NodeID     *string
	// contains filtered or unexported fields
}

func (*UserWebhookSubscription) Alias

func (sub *UserWebhookSubscription) Alias() string

func (*UserWebhookSubscription) As

func (*UserWebhookSubscription) Fields

func (UserWebhookSubscription) IsWebhookSubscription

func (UserWebhookSubscription) IsWebhookSubscription()

func (*UserWebhookSubscription) QueryWithCursor

func (sub *UserWebhookSubscription) QueryWithCursor(ctx context.Context,
	runner sq.BaseRunner, q sq.SelectBuilder,
	cur *model.Cursor) ([]WebhookSubscription, *model.Cursor)

func (*UserWebhookSubscription) Table

func (sub *UserWebhookSubscription) Table() string

type WebhookDelivery

type WebhookDelivery struct {
	UUID            string       `json:"uuid"`
	Date            time.Time    `json:"date"`
	Event           WebhookEvent `json:"event"`
	RequestBody     string       `json:"requestBody"`
	ResponseBody    *string      `json:"responseBody"`
	ResponseHeaders *string      `json:"responseHeaders"`
	ResponseStatus  *int         `json:"responseStatus"`

	ID             int
	SubscriptionID int
	Name           string
	// contains filtered or unexported fields
}

func (*WebhookDelivery) Alias

func (whd *WebhookDelivery) Alias() string

func (*WebhookDelivery) As

func (whd *WebhookDelivery) As(alias string) *WebhookDelivery

func (*WebhookDelivery) Fields

func (whd *WebhookDelivery) Fields() *database.ModelFields

func (*WebhookDelivery) QueryWithCursor

func (whd *WebhookDelivery) QueryWithCursor(ctx context.Context,
	runner sq.BaseRunner, q sq.SelectBuilder,
	cur *model.Cursor) ([]*WebhookDelivery, *model.Cursor)

func (*WebhookDelivery) Table

func (whd *WebhookDelivery) Table() string

func (*WebhookDelivery) WithName

func (whd *WebhookDelivery) WithName(name string) *WebhookDelivery

type WebhookTrigger

type WebhookTrigger struct {
	ID        int              `json:"id"`
	URL       string           `json:"url"`
	Condition TriggerCondition `json:"condition"`
}

func (WebhookTrigger) IsTrigger

func (WebhookTrigger) IsTrigger()

Jump to

Keyboard shortcuts

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