Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("runstate: not found") ErrStaleSnapshot = errors.New("runstate: snapshot version is stale") ErrInvalidStatus = errors.New("runstate: invalid status") ErrInvalidTransition = errors.New("runstate: invalid status transition") ErrTokenSuperseded = errors.New("humangate: token superseded by newer version") )
View Source
var ErrInvalidToken = errors.New("runstate: invalid token")
Functions ¶
This section is empty.
Types ¶
type BlobRef ¶
type BlobRef struct {
ID string `json:"id"`
Size int64 `json:"size"`
Sha256 string `json:"sha256"`
}
func NewBlobRef ¶
type Repository ¶
type RunSnapshot ¶
type RunSnapshot struct {
RunID string `json:"run_id"`
Version int64 `json:"version"`
ScenarioName string `json:"scenario_name"`
CurrentNodeID string `json:"current_node_id,omitempty"`
Status RunStatus `json:"status"`
Variables map[string]json.RawMessage `json:"variables,omitempty"`
StepOutputs map[string]StepOutputRef `json:"step_outputs,omitempty"`
PendingGate *core.CheckpointState `json:"pending_gate,omitempty"`
}
func (RunSnapshot) Validate ¶
func (s RunSnapshot) Validate() error
type StepOutputRef ¶
type StepOutputRef struct {
Inline json.RawMessage `json:"inline,omitempty"`
Blob *BlobRef `json:"blob,omitempty"`
}
type TokenPayload ¶
type TokenSigner ¶
type TokenSigner struct {
// contains filtered or unexported fields
}
func NewTokenSigner ¶
func NewTokenSigner(secret []byte) (*TokenSigner, error)
func (*TokenSigner) Sign ¶
func (s *TokenSigner) Sign(payload TokenPayload) (string, error)
func (*TokenSigner) Verify ¶
func (s *TokenSigner) Verify(token string) (TokenPayload, error)
Click to show internal directories.
Click to hide internal directories.