Documentation
¶
Overview ¶
Package workflow contains the final, clean-break pt project and administration workflows. It is additive until the coordinated cutover.
Index ¶
- Variables
- func NewScaffold(parent, name string, kind scaffold.Kind, access string) (string, error)
- func OpenProfile(profile Profile) (runner.Capabilities, func(), error)
- func SSHInstruction(record paired.ServerRecord, handle string) (string, error)
- type API
- func (a *API) Access(ctx context.Context, id string) (AccessResult, error)
- func (a *API) AddAccess(ctx context.Context, appID, name, publicKey, fingerprint string) error
- func (a *API) App(ctx context.Context, id string) (AppResult, error)
- func (a *API) Apps(ctx context.Context) (AppsResult, error)
- func (a *API) Audit(ctx context.Context) (AuditResult, error)
- func (a *API) DeleteSecret(ctx context.Context, appID, key string) error
- func (a *API) Deploy(ctx context.Context, input ArtifactRequest, previous string) (DeployResult, error)
- func (a *API) Devices(ctx context.Context) (DevicesResult, error)
- func (a *API) Egress(ctx context.Context, id string) (EgressResult, error)
- func (a *API) FollowSessions(ctx context.Context, appID string, interval time.Duration, ...) error
- func (a *API) InviteDevice(ctx context.Context, deviceName string) (Invitation, error)
- func (a *API) RemoveAccess(ctx context.Context, appID, keyID string) error
- func (a *API) RevokeDevice(ctx context.Context, deviceID string) error
- func (a *API) Secrets(ctx context.Context, id string) (SecretsResult, error)
- func (a *API) Sessions(ctx context.Context, id string) (SessionsResult, error)
- func (a *API) SetEgress(ctx context.Context, appID, host string, allowed bool) error
- func (a *API) SetSecret(ctx context.Context, appID, key, value string) error
- func (a *API) Version(ctx context.Context) (Version, error)
- type AccessResult
- type App
- type AppResult
- type AppsResult
- type ArtifactRequest
- type AuditResult
- type BuildResult
- type ConfirmFunc
- type DeployResult
- type Device
- type DevicesResult
- type EgressResult
- type Invitation
- type Manifest
- type OpenFunc
- type ProblemError
- type Profile
- type Runner
- type SecretsResult
- type SessionsResult
- type Version
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewScaffold ¶
NewScaffold requires the app mode explicitly and writes the clean manifest with an explicit access policy. There is no implicit target or history file.
func OpenProfile ¶
func OpenProfile(profile Profile) (runner.Capabilities, func(), error)
func SSHInstruction ¶
func SSHInstruction(record paired.ServerRecord, handle string) (string, error)
SSHInstruction returns a direct leaf command. It intentionally does not route through pt or expose a control URL/token.
Types ¶
type API ¶
func (*API) Deploy ¶
func (a *API) Deploy(ctx context.Context, input ArtifactRequest, previous string) (DeployResult, error)
func (*API) FollowSessions ¶
func (*API) InviteDevice ¶
func (*API) RemoveAccess ¶
type AccessResult ¶
type AccessResult struct {
Keys []json.RawMessage `json:"keys"`
}
type AppResult ¶
type AppResult struct {
App App `json:"app"`
ActiveDeployment json.RawMessage `json:"activeDeployment"`
}
type AppsResult ¶
type AppsResult struct {
Apps []App `json:"apps"`
}
type ArtifactRequest ¶
type AuditResult ¶
type AuditResult struct {
Events []json.RawMessage `json:"events"`
}
type BuildResult ¶
type ConfirmFunc ¶
type DeployResult ¶
type DeployResult struct {
API int `json:"apiVersion"`
App json.RawMessage `json:"app"`
Deploy json.RawMessage `json:"deploy"`
Artifact json.RawMessage `json:"artifact"`
}
type DevicesResult ¶
type DevicesResult struct {
Devices []Device `json:"devices"`
}
type EgressResult ¶
type EgressResult struct {
Hosts []string `json:"hosts"`
}
type Invitation ¶
type Manifest ¶
type Manifest struct {
Name string `json:"name"`
Type string `json:"type"`
Access string `json:"access"`
}
func ReadManifest ¶
type ProblemError ¶
type ProblemError struct {
Status int `json:"status"`
Code string `json:"code"`
Title string `json:"title"`
Detail string `json:"detail"`
}
func (*ProblemError) Error ¶
func (e *ProblemError) Error() string
type Profile ¶
Profile is the hosted-parity local development profile. It is persistent by default and reset only when explicitly requested.
type Runner ¶
type Runner struct {
Context context.Context
In io.Reader
Out io.Writer
Err io.Writer
StorePath string
KeyDir string
Workspace string
Open OpenFunc
Confirm ConfirmFunc
Probe transport.Probe
Pair paired.PairExchange
}
Runner is the explicit clean command surface. It receives all I/O and network opening through fields, so tests and JSON/CI callers do not inherit global argv, environment, or stdio mutations.
type SecretsResult ¶
type SecretsResult struct {
Secrets []json.RawMessage `json:"secrets"`
}
type SessionsResult ¶
type SessionsResult struct {
Sessions []json.RawMessage `json:"sessions"`
}