Documentation
¶
Index ¶
- Constants
- func ApprovedScript(ctx context.Context, approvals ApprovalReader, ...) (data []byte, hash string, approved bool, err error)
- func InspectScript(dir, name string) ([]byte, string, error)
- func ReadScript(dir, name string) ([]byte, string, error)
- func SanitizeText(text string, limit int) string
- func ValidScript(name string) bool
- func ValidateResult(r Result, l Limits) error
- type ApprovalReader
- type CatalogScope
- type Error
- type ErrorCode
- type ExtensionPoller
- type Item
- type KindDescriptor
- type Limits
- type Ref
- type Request
- type Result
- type Runner
- type ScriptRunner
- type WorkspaceRef
Constants ¶
View Source
const SummaryBytes = 8 << 10
Variables ¶
This section is empty.
Functions ¶
func ApprovedScript ¶
func ApprovedScript( ctx context.Context, approvals ApprovalReader, profileID, definitionDir, name string, ) (data []byte, hash string, approved bool, err error)
ApprovedScript reads an executable script and reports whether the operator approved its current bytes, keyed the same way approvals are stored: profile, resolved definition dir, name.
func SanitizeText ¶
func ValidScript ¶
func ValidateResult ¶
Types ¶
type ApprovalReader ¶
type CatalogScope ¶
type CatalogScope struct{ ProfileID, WorkspaceID string }
type Error ¶
func (*Error) DiagnosticCode ¶
type ExtensionPoller ¶
type ExtensionPoller interface {
PollSource(context.Context, CatalogScope, string, Request) (Result, error)
SourceKinds(context.Context, CatalogScope) ([]KindDescriptor, error)
}
type KindDescriptor ¶
type Ref ¶
type Request ¶
type Request struct {
Version int `json:"version"`
SourceID string `json:"source_id"`
Kind string `json:"kind,omitempty"`
Params jsontext.Value `json:"params"`
State jsontext.Value `json:"state"`
Limits Limits `json:"limits"`
Workspace WorkspaceRef `json:"workspace"`
Now time.Time `json:"now"`
DryRun bool `json:"dry_run"`
}
type ScriptRunner ¶
type WorkspaceRef ¶
Click to show internal directories.
Click to hide internal directories.