models

package
v0.0.0-...-70b3fac Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type CreateTask

type CreateTask struct {
	// Task name
	Name string `json:"name"`
	// Task type (SHELL, WEBHOOK)
	Type models.TaskType `json:"type"`
	// Task configuration
	Configuration *InputTaskConfiguration `json:"configuration"`
	// Status of the task
	Status *models.Status `json:"status"`
}

CreateTask is the data structure used by mutation of create Task

type EditTask

type EditTask struct {
	// Task name
	Name *string `json:"name"`
	// Task type (SHELL, WEBHOOK)
	Type *models.TaskType `json:"type"`
	// Task configuration
	Configuration *InputTaskConfiguration `json:"configuration"`
	// Status of the task
	Status *models.Status `json:"status"`
}

EditTask is the data structure used by mutation of edit Task

type HTTPMethod

type HTTPMethod string

HTTPMethod indicates the list of HTTP methods

const (
	HTTPMethodGet     HTTPMethod = "GET"
	HTTPMethodHead    HTTPMethod = "HEAD"
	HTTPMethodPost    HTTPMethod = "POST"
	HTTPMethodPut     HTTPMethod = "PUT"
	HTTPMethodPatch   HTTPMethod = "PATCH"
	HTTPMethodDelete  HTTPMethod = "DELETE"
	HTTPMethodConnect HTTPMethod = "CONNECT"
	HTTPMethodOptions HTTPMethod = "OPTIONS"
	HTTPMethodTrace   HTTPMethod = "TRACE"
)

func (HTTPMethod) IsValid

func (e HTTPMethod) IsValid() bool

func (HTTPMethod) MarshalGQL

func (e HTTPMethod) MarshalGQL(w io.Writer)

func (HTTPMethod) String

func (e HTTPMethod) String() string

func (*HTTPMethod) UnmarshalGQL

func (e *HTTPMethod) UnmarshalGQL(v interface{}) error

type InputTaskConfiguration

type InputTaskConfiguration struct {
	// Shell task configuration
	Shell *models.TaskConfigurationShell `json:"shell"`
	// Webhook task configuration
	Webhook *models.TaskConfigurationWebhook `json:"webhook"`
}

InputTaskConfiguration is a collection type of InputTaskConfigurationShell and InputTaskConfigurationWebhook, which is an alternative to the temporarily unsupported inputUnion

type Model

type Model interface {
	IsModel()
	// Entry ID
	GetID() int64
	// Entry created time
	GetCreatedAt() int64
	// Entry updated time
	GetUpdatedAt() int64
}

Definition of the base fields of the data model

type TaskConfiguration

type TaskConfiguration interface {
	IsTaskConfiguration()
}

TaskConfiguration is an aggregated type of multiple configurations

Jump to

Keyboard shortcuts

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