Documentation ¶
Index ¶
- type Auth
- type Builds
- type Connections
- type Deployments
- type DispatchOptions
- type Dispatcher
- type Envs
- type Events
- type GetLogResults
- type Integration
- type Integrations
- type ListBuildsFilter
- type ListConnectionsFilter
- type ListDeploymentsFilter
- type ListEventRecordsFilter
- type ListEventsFilter
- type ListOrder
- type ListSessionLogRecordsFilter
- type ListSessionResult
- type ListSessionsFilter
- type ListTriggersFilter
- type NewRunIDFunc
- type OAuth
- type Projects
- type Run
- type RunCallFunc
- type RunCallbacks
- func (rc *RunCallbacks) SafeCall(ctx context.Context, rid sdktypes.RunID, v sdktypes.Value, ...) (sdktypes.Value, error)
- func (rc *RunCallbacks) SafeLoad(ctx context.Context, rid sdktypes.RunID, path string) (map[string]sdktypes.Value, error)
- func (rc *RunCallbacks) SafeNewRunID() sdktypes.RunID
- func (rc *RunCallbacks) SafePrint(ctx context.Context, rid sdktypes.RunID, text string)
- type RunLoadFunc
- type RunPrintFunc
- type Runtime
- type Runtimes
- type Scheduler
- type Services
- type Sessions
- type Store
- type Triggers
- type Vars
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builds ¶
type Builds interface { Get(ctx context.Context, id sdktypes.BuildID) (sdktypes.Build, error) List(ctx context.Context, filter ListBuildsFilter) ([]sdktypes.Build, error) Download(ctx context.Context, id sdktypes.BuildID) (io.ReadCloser, error) Save(ctx context.Context, build sdktypes.Build, data []byte) (sdktypes.BuildID, error) Delete(ctx context.Context, id sdktypes.BuildID) error Describe(ctx context.Context, id sdktypes.BuildID) (*sdkbuildfile.BuildFile, error) }
type Connections ¶
type Connections interface { Create(ctx context.Context, conn sdktypes.Connection) (sdktypes.ConnectionID, error) Delete(ctx context.Context, id sdktypes.ConnectionID) error Update(ctx context.Context, conn sdktypes.Connection) error List(ctx context.Context, filter ListConnectionsFilter) ([]sdktypes.Connection, error) Get(ctx context.Context, id sdktypes.ConnectionID) (sdktypes.Connection, error) Test(ctx context.Context, id sdktypes.ConnectionID) (sdktypes.Status, error) RefreshStatus(ctx context.Context, id sdktypes.ConnectionID) (sdktypes.Status, error) }
type Deployments ¶
type Deployments interface { Create(ctx context.Context, deployment sdktypes.Deployment) (sdktypes.DeploymentID, error) Activate(ctx context.Context, deploymentID sdktypes.DeploymentID) error Deactivate(ctx context.Context, deploymentID sdktypes.DeploymentID) error Drain(ctx context.Context, deploymentID sdktypes.DeploymentID) error Get(ctx context.Context, id sdktypes.DeploymentID) (sdktypes.Deployment, error) Test(ctx context.Context, deploymentID sdktypes.DeploymentID) error List(ctx context.Context, filter ListDeploymentsFilter) ([]sdktypes.Deployment, error) Delete(ctx context.Context, id sdktypes.DeploymentID) error }
type DispatchOptions ¶
type DispatchOptions struct { // If set, dispatch only to deployments in this environment. Can be either an env ID or full path (project/env). Env string // If set, dispatch only to this specific deployment. DeploymentID sdktypes.DeploymentID }
type Dispatcher ¶
type Envs ¶
type Envs interface { List(ctx context.Context, projectID sdktypes.ProjectID) ([]sdktypes.Env, error) Create(ctx context.Context, env sdktypes.Env) (sdktypes.EnvID, error) GetByID(ctx context.Context, envID sdktypes.EnvID) (sdktypes.Env, error) GetByName(ctx context.Context, projectID sdktypes.ProjectID, name sdktypes.Symbol) (sdktypes.Env, error) Remove(ctx context.Context, envID sdktypes.EnvID) error Update(ctx context.Context, env sdktypes.Env) error }
type Events ¶
type Events interface { Save(ctx context.Context, event sdktypes.Event) (sdktypes.EventID, error) Get(ctx context.Context, eventID sdktypes.EventID) (sdktypes.Event, error) // List returns events without their data. List(ctx context.Context, filter ListEventsFilter) ([]sdktypes.Event, error) AddEventRecord(context.Context, sdktypes.EventRecord) error ListEventRecords(context.Context, ListEventRecordsFilter) ([]sdktypes.EventRecord, error) }
type GetLogResults ¶ added in v0.8.0
type GetLogResults struct { Log sdktypes.SessionLog sdktypes.PaginationResult }
type Integration ¶
type Integration interface { // Get returns the configuration details of this integration and the // external service that it wraps. Get() sdktypes.Integration Configure(ctx context.Context, cid sdktypes.ConnectionID) (vs map[string]sdktypes.Value, config map[string]string, err error) TestConnection(ctx context.Context, cid sdktypes.ConnectionID) (sdktypes.Status, error) GetConnectionStatus(ctx context.Context, cid sdktypes.ConnectionID) (sdktypes.Status, error) GetConnectionConfig(ctx context.Context, cid sdktypes.ConnectionID) (map[string]string, error) sdkexecutor.Caller }
Integration is implemented for each external service, to let the autokitteh server interact with it.
type Integrations ¶
type Integrations interface { // Get returns the instance of an integration which has already been registered // in the autokitteh server, and is available for usage by runtime connections. GetByID(ctx context.Context, id sdktypes.IntegrationID) (Integration, error) GetByName(ctx context.Context, name sdktypes.Symbol) (Integration, error) // List returns an enumeration - with optional filtering - of all // the integrations which have been registered in the autokitteh // server, and are available for usage by runtime connections. // TODO: Add an optional tag-search-term filter argument. List(ctx context.Context, nameSubstring string) ([]sdktypes.Integration, error) }
Integrations is implemented by the autokitteh core, to manage integrations of external services within a running autokitteh server.
type ListBuildsFilter ¶
type ListBuildsFilter struct {
Limit uint32
}
type ListConnectionsFilter ¶
type ListConnectionsFilter struct { IntegrationID sdktypes.IntegrationID ProjectID sdktypes.ProjectID StatusCode sdktypes.StatusCode }
type ListDeploymentsFilter ¶
type ListEventRecordsFilter ¶
type ListEventsFilter ¶
type ListEventsFilter struct { IntegrationID sdktypes.IntegrationID ConnectionID sdktypes.ConnectionID EventType string Limit int CreatedAfter *time.Time MinSequenceNumber uint64 Order ListOrder }
type ListSessionLogRecordsFilter ¶ added in v0.8.0
type ListSessionLogRecordsFilter struct { SessionID sdktypes.SessionID sdktypes.PaginationRequest }
type ListSessionResult ¶ added in v0.4.6
type ListSessionResult struct { Sessions []sdktypes.Session sdktypes.PaginationResult }
type ListSessionsFilter ¶
type ListSessionsFilter struct { DeploymentID sdktypes.DeploymentID EnvID sdktypes.EnvID EventID sdktypes.EventID BuildID sdktypes.BuildID StateType sdktypes.SessionStateType CountOnly bool sdktypes.PaginationRequest }
type ListTriggersFilter ¶ added in v0.2.0
type NewRunIDFunc ¶
type OAuth ¶
type OAuth interface { Register(ctx context.Context, id string, cfg *oauth2.Config, opts map[string]string) error Get(ctx context.Context, id string) (*oauth2.Config, map[string]string, error) StartFlow(ctx context.Context, integration string, cid sdktypes.ConnectionID, origin string) (string, error) Exchange(ctx context.Context, integration, code string) (*oauth2.Token, error) }
OAuth is a generic implementation of 3-legged OAuth 2.0 flows, reusable by OAuth-based integrations and autokitteh user authentication. It assumes that the autokitteh server has a public address for callbacks, which allows callers of this service not to care about this requirement.
type Projects ¶
type Projects interface { Create(ctx context.Context, project sdktypes.Project) (sdktypes.ProjectID, error) Delete(ctx context.Context, projectID sdktypes.ProjectID) error Update(ctx context.Context, project sdktypes.Project) error GetByID(ctx context.Context, projectID sdktypes.ProjectID) (sdktypes.Project, error) GetByName(ctx context.Context, name sdktypes.Symbol) (sdktypes.Project, error) List(ctx context.Context) ([]sdktypes.Project, error) Build(ctx context.Context, projectID sdktypes.ProjectID) (sdktypes.BuildID, error) SetResources(ctx context.Context, projectID sdktypes.ProjectID, resources map[string][]byte) error DownloadResources(ctx context.Context, projectID sdktypes.ProjectID) (map[string][]byte, error) }
type RunCallFunc ¶
type RunCallbacks ¶
type RunCallbacks struct { // Returns sdktypes.ProgramErrorAsError if not internal error. Load RunLoadFunc // Returns sdktypes.ProgramErrorAsError if not internal error. Call RunCallFunc Print RunPrintFunc NewRunID NewRunIDFunc }
func (*RunCallbacks) SafeNewRunID ¶
func (rc *RunCallbacks) SafeNewRunID() sdktypes.RunID
type RunLoadFunc ¶
type Runtime ¶
type Runtime interface { Get() sdktypes.Runtime // Returns sdktypes.ProgramErrorAsError if not internal error. Build(ctx context.Context, fs fs.FS, path string, symbols []sdktypes.Symbol) (sdktypes.BuildArtifact, error) // Returns sdktypes.ProgramErrorAsError if not internal error. Run( ctx context.Context, rid sdktypes.RunID, path string, compiled map[string][]byte, values map[string]sdktypes.Value, cbs *RunCallbacks, ) (Run, error) }
type Runtimes ¶
type Runtimes interface { List(ctx context.Context) ([]sdktypes.Runtime, error) New(ctx context.Context, name sdktypes.Symbol) (Runtime, error) Build(ctx context.Context, fs fs.FS, symbols []sdktypes.Symbol, memo map[string]string) (*sdkbuildfile.BuildFile, error) Run( ctx context.Context, rid sdktypes.RunID, path string, build *sdkbuildfile.BuildFile, globals map[string]sdktypes.Value, cbs *RunCallbacks, ) (Run, error) }
type Services ¶
type Services interface { Auth() Auth Builds() Builds Connections() Connections Deployments() Deployments Dispatcher() Dispatcher Envs() Envs Events() Events Integrations() Integrations OAuth() OAuth Projects() Projects Runtimes() Runtimes Sessions() Sessions Store() Store Triggers() Triggers Vars() Vars }
type Sessions ¶
type Sessions interface { Start(ctx context.Context, session sdktypes.Session) (sdktypes.SessionID, error) Stop(ctx context.Context, sessionID sdktypes.SessionID, reason string, force bool) error // List returns sessions without their data. List(ctx context.Context, filter ListSessionsFilter) (ListSessionResult, error) Get(ctx context.Context, sessionID sdktypes.SessionID) (sdktypes.Session, error) GetLog(ctx context.Context, filter ListSessionLogRecordsFilter) (GetLogResults, error) Delete(ctx context.Context, sessionID sdktypes.SessionID) error }
type Triggers ¶ added in v0.2.0
type Triggers interface { Create(ctx context.Context, trigger sdktypes.Trigger) (sdktypes.TriggerID, error) Update(ctx context.Context, trigger sdktypes.Trigger) error Delete(ctx context.Context, triggerID sdktypes.TriggerID) error Get(ctx context.Context, triggerID sdktypes.TriggerID) (sdktypes.Trigger, error) List(ctx context.Context, filter ListTriggersFilter) ([]sdktypes.Trigger, error) }
type Vars ¶ added in v0.5.0
type Vars interface { Set(ctx context.Context, v ...sdktypes.Var) error Delete(ctx context.Context, sid sdktypes.VarScopeID, names ...sdktypes.Symbol) error Get(ctx context.Context, sid sdktypes.VarScopeID, names ...sdktypes.Symbol) (sdktypes.Vars, error) Reveal(ctx context.Context, sid sdktypes.VarScopeID, names ...sdktypes.Symbol) (sdktypes.Vars, error) FindConnectionIDs(ctx context.Context, iid sdktypes.IntegrationID, name sdktypes.Symbol, value string) ([]sdktypes.ConnectionID, error) }
Click to show internal directories.
Click to hide internal directories.