Documentation
¶
Overview ¶
Exposes types that are used in the SDK. Those types are mostly an immutable boxes for proto defined types. The idea behind hiding behind a box is twofold: 1. Make the data immutable. 2. Make invalid data unrepresantble. There must be no way to instansiate an object or an id outside of the SDK, other than other via SDK methods, such as <Object>FromProto or New<Object>ID.
Strict* versions of object functions do not allow for missing required fields. They do allow, though, for missing the entire object entirely (nil input).
Strict* versions of ids and handles (non-objects) do not allow for missing values at all.
Index ¶
- Constants
- Variables
- func DictValueToStringMap(v Value) (map[string]Value, error)
- func DictValueToStringsMap(v Value) (map[string]Value, error)
- func EnvHasID(e Env) bool
- func EqualValues(a, b Value) bool
- func EventToValues(e Event) map[string]Value
- func FunctionValueHasExecutorID(v Value) bool
- func FunctionValueHasFlag(v Value, flag FunctionFlag) bool
- func GetBooleanValue(v Value) bool
- func GetBuildArtifactCompiledData(p BuildArtifact) map[string][]byte
- func GetBuildCreatedAt(b Build) time.Time
- func GetBytesValue(v Value) []byte
- func GetCodeLocationCanonicalString(l CodeLocation) string
- func GetCodeLocationName(l CodeLocation) string
- func GetCodeLocationPath(l CodeLocation) string
- func GetCodeLocationRowCol(l CodeLocation) (uint32, uint32)
- func GetConnectionIntegrationToken(c Connection) string
- func GetDictValueLen(v Value) int
- func GetDurationValue(v Value) time.Duration
- func GetEnvVarValue(e EnvVar) string
- func GetEventCreatedAt(e Event) time.Time
- func GetEventData(e Event) map[string]Value
- func GetEventIntegrationToken(e Event) string
- func GetEventMemo(e Event) map[string]string
- func GetEventRecordCreatedAt(er EventRecord) time.Time
- func GetEventRecordSeq(er EventRecord) uint32
- func GetEventSequenceNumber(e Event) uint64
- func GetEventType(e Event) string
- func GetFloatValue(v Value) float64
- func GetFunctionValueArgsNames(v Value) []string
- func GetFunctionValueData(v Value) []byte
- func GetFunctionValueUniqueID(v Value) string
- func GetIntegerValue(v Value) int64
- func GetIntegrationConnectionURL(i Integration) *url.URL
- func GetIntegrationDescription(i Integration) string
- func GetIntegrationDisplayName(i Integration) string
- func GetIntegrationLogoURL(i Integration) *url.URL
- func GetIntegrationUserLinks(i Integration) map[string]*url.URL
- func GetLoadWaitRunStatePath(l LoadWaitRunState) string
- func GetMappingEventType(me MappingEvent) string
- func GetModuleFunctionDescription(i ModuleFunction) string
- func GetModuleFunctions(m Module) map[string]ModuleFunction
- func GetModuleVariableDescription(i ModuleVariable) string
- func GetModuleVariables(m Module) map[string]ModuleVariable
- func GetObjectHash(o Object) string
- func GetOriginalEventID(e Event) string
- func GetProgramErrorExtra(e ProgramError) map[string]string
- func GetProgramErrorMessage(e ProgramError) string
- func GetProjectResourcePaths(p Project) []string
- func GetProjectResourcesRootURL(p Project) *url.URL
- func GetRequirementURL(r Requirement) *url.URL
- func GetRuntimeFileExtensions(r Runtime) []string
- func GetSessionCallResultError(r SessionCallAttemptResult) error
- func GetSessionCallSpecData(v SessionCallSpec) (Value, []Value, map[string]Value)
- func GetSessionCallSpecSeq(v SessionCallSpec) uint32
- func GetSessionHistoryStatePrints(s SessionState) []string
- func GetSessionInputs(e Session) map[string]Value
- func GetSessionLogRecordData(r SessionLogRecord) any
- func GetSessionLogRecordPrint(r SessionLogRecord) string
- func GetSessionLogRecordTimestamp(record SessionLogRecord) time.Time
- func GetSessionMemo(e Session) map[string]string
- func GetStringValue(v Value) string
- func GetTimeValue(v Value) time.Time
- func GetValueLength(v Value) (int, error)
- func IsEnvVarSecret(e EnvVar) bool
- func IsID(s string) bool
- func IsName(s string) bool
- func IsValidID(s string) bool
- func IsValidName(s string) bool
- func NewSequentialIDGeneratorForTesting(init uint64) func() string
- func ObjectToString(o Object) string
- func ParseEnvIDOrName(raw string) (Name, EnvID, error)
- func ParseProjectIDOrName(raw string) (Name, ProjectID, error)
- func ProgramErrorToError(e ProgramError) error
- func ProjectHasID(p Project) bool
- func SetIDGenerator(f func() string)
- func SplitRawID(raw string) (kind, data string, ok bool)
- func StrictValidateValuePB(pb *ValuePB) error
- func StringValueMapToProto(m map[string]Value) map[string]*ValuePB
- func StructValueToStringMap(v Value) (map[string]Value, error)
- func ToMessage(obj Object) proto.Message
- func ToProto[T comparableProto](o *object[T]) T
- func UUIDGenerator() string
- func ValidateValuePB(pb *ValuePB) error
- func ValueToDuration(v Value) (time.Duration, error)
- func ValueToStringValuesMap(v Value) (map[string]Value, error)
- func ValueToTime(v Value) (time.Time, error)
- type BooleanValue
- type Build
- type BuildArtifact
- type BuildArtifactPB
- type BuildID
- type BuildIDTraits
- type BuildPB
- type BytesValue
- type CallFrame
- type CallFramePB
- type CallWaitRunState
- type CodeLocation
- func GetExportCodeLocation(e Export) CodeLocation
- func GetMappingEventCodeLocation(me MappingEvent) CodeLocation
- func GetRequirementCodeLocation(r Requirement) CodeLocation
- func GetSessionEntryPoint(e Session) CodeLocation
- func ParseCodeLocation(s string) (CodeLocation, error)
- func StrictParseCodeLocation(s string) (CodeLocation, error)
- type CodeLocationPB
- type CompletedRunState
- type CompletedSessionState
- type Connection
- type ConnectionID
- type ConnectionPB
- type CreatedSessionState
- type Deployment
- type DeploymentID
- type DeploymentPB
- type DeploymentSessionsStats
- type DeploymentState
- type DictValue
- type DictValueItem
- type DurationValue
- type Env
- type EnvID
- type EnvPB
- type EnvVar
- type EnvVarPB
- type ErrorRunState
- type ErrorSessionState
- type Event
- type EventID
- type EventPB
- type EventRecord
- type EventRecordPB
- type EventState
- type ExecutorID
- type Export
- type ExportPB
- type FloatValue
- type FunctionFlag
- type FunctionValue
- type ID
- type IdleRunState
- type IntegerValue
- type Integration
- type IntegrationID
- func GetConnectionIntegrationID(c Connection) IntegrationID
- func GetEventIntegrationID(e Event) IntegrationID
- func GetIntegrationID(i Integration) IntegrationID
- func IntegrationIDFromName(name string) IntegrationID
- func NewIntegrationID() IntegrationID
- func ParseIntegrationID(raw string) (IntegrationID, error)
- func StrictParseIntegrationID(raw string) (IntegrationID, error)
- type IntegrationPB
- type ListValue
- type LoadWaitRunState
- type Mapping
- type MappingEntrypointID
- type MappingEvent
- type MappingEventPB
- type MappingID
- type MappingPB
- type Module
- type ModuleFunction
- type ModuleFunctionFieldPB
- type ModuleFunctionPB
- type ModulePB
- type ModuleValue
- type ModuleVariable
- type ModuleVariablePB
- type Name
- type NothingValue
- type Object
- type ProgramError
- type ProgramErrorAsError
- type ProgramErrorPB
- type Project
- type ProjectID
- func GetBuildProjectID(b Build) ProjectID
- func GetConnectionProjectID(c Connection) ProjectID
- func GetEnvProjectID(e Env) ProjectID
- func GetProjectID(p Project) ProjectID
- func MustParseProjectID(raw string) ProjectID
- func NewProjectID() ProjectID
- func ParseProjectID(raw string) (ProjectID, error)
- func StrictParseProjectID(raw string) (ProjectID, error)
- type ProjectPB
- type Requirement
- type RequirementPB
- type RunID
- type RunStatus
- type RunStatusPB
- type RunningRunState
- type RunningSessionState
- type Runtime
- type RuntimePB
- type Session
- type SessionCall
- type SessionCallAttemptComplete
- type SessionCallAttemptCompletePB
- type SessionCallAttemptResult
- func GetSessionCallAttemptCompleteResult(c SessionCallAttemptComplete) SessionCallAttemptResult
- func NewSessionCallAttemptErrorResult(err error) SessionCallAttemptResult
- func NewSessionCallAttemptResult(v Value, err error) SessionCallAttemptResult
- func NewSessionCallAttemptValueResult(v Value) SessionCallAttemptResult
- type SessionCallAttemptResultPB
- type SessionCallAttemptStart
- type SessionCallAttemptStartPB
- type SessionCallPB
- type SessionCallSpec
- type SessionCallSpecPB
- type SessionID
- type SessionIDTraits
- type SessionLog
- type SessionLogPB
- type SessionLogRecord
- func NewCallAttemptCompleteSessionLogRecord(complete SessionCallAttemptComplete) SessionLogRecord
- func NewCallAttemptStartSessionLogRecord(start SessionCallAttemptStart) SessionLogRecord
- func NewCallSpecSessionLogRecord(spec SessionCallSpec) SessionLogRecord
- func NewPrintSessionLogRecord(print string) SessionLogRecord
- func NewSessionLogCallAttemptComplete(spec SessionCallAttemptComplete) SessionLogRecord
- func NewSessionLogCallAttemptStart(spec SessionCallAttemptStart) SessionLogRecord
- func NewSessionLogCallSpec(spec SessionCallSpec) SessionLogRecord
- func NewSessionLogPrint(print string) SessionLogRecord
- func NewSessionLogState(state SessionState) SessionLogRecord
- func NewStateSessionLogRecord(state SessionState) SessionLogRecord
- type SessionLogRecordPB
- type SessionPB
- type SessionState
- type SessionStatePB
- type SessionStateType
- type SetValue
- type StringValue
- type StructValue
- type Symbol
- func GetEnvVarName(e EnvVar) Symbol
- func GetExportSymbol(e Export) Symbol
- func GetFunctionValueName(v Value) Symbol
- func GetMappingModuleName(m Mapping) Symbol
- func GetModuleValue(v Value) (Symbol, map[string]Value)
- func GetRequirementSymbol(r Requirement) Symbol
- func GetSymbolValue(v Value) Symbol
- func ParseSymbol(s string) (Symbol, error)
- func StrictParseSymbol(s string) (Symbol, error)
- type SymbolValue
- type TimeValue
- type Value
- func GetDictValueKeys(v Value) []Value
- func GetListValue(v Value) []Value
- func GetSessionCallResultValue(r SessionCallAttemptResult) Value
- func GetSessionStateCallValue(s SessionState) Value
- func GetSetValue(v Value) []Value
- func GetStructValue(v Value) (Value, map[string]Value)
- func MustNewValue(v Object) Value
- func NewDictValue(items []*DictValueItem) Value
- func NewDictValueFromStringMap(kvs map[string]Value) Value
- func NewFunctionValue(xid ExecutorID, name string, data []byte, flags []FunctionFlag, ...) Value
- func NewListValue(vs []Value) Value
- func NewModuleValue(name Symbol, members map[string]Value) Value
- func NewSetValue(vs []Value) Value
- func NewStructValue(ctor Value, fields map[string]Value) Value
- func NewValue(v Object) (Value, error)
- func SessionCallResultAsPair(r SessionCallAttemptResult) (Value, error)
- func StrictValueFromProto(pb *ValuePB) (Value, error)
- func ValueFromProto(pb *ValuePB) (Value, error)
- type ValuePB
Constants ¶
const ( DeploymentStateUnspecified = DeploymentState(deploymentsv1.DeploymentState_DEPLOYMENT_STATE_UNSPECIFIED) DeploymentStateActive = DeploymentState(deploymentsv1.DeploymentState_DEPLOYMENT_STATE_ACTIVE) DeploymentStateDraining = DeploymentState(deploymentsv1.DeploymentState_DEPLOYMENT_STATE_DRAINING) DeploymentStateInactive = DeploymentState(deploymentsv1.DeploymentState_DEPLOYMENT_STATE_INACTIVE) DeploymentStateTesting = DeploymentState(deploymentsv1.DeploymentState_DEPLOYMENT_STATE_TESTING) )
const ( EventStateUnspecified = EventState(eventsv1.EventState_EVENT_STATE_UNSPECIFIED) EventStateSaved = EventState(eventsv1.EventState_EVENT_STATE_SAVED) EventStateProcessing = EventState(eventsv1.EventState_EVENT_STATE_PROCESSING) EventStateCompleted = EventState(eventsv1.EventState_EVENT_STATE_COMPLETED) EventStateFailed = EventState(eventsv1.EventState_EVENT_STATE_FAILED) )
Event Record State Enum
const ( UnspecifiedSessionStateType = SessionStateType(sessionsv1.SessionStateType_SESSION_STATE_TYPE_UNSPECIFIED) CreatedSessionStateType = SessionStateType(sessionsv1.SessionStateType_SESSION_STATE_TYPE_CREATED) RunningSessionStateType = SessionStateType(sessionsv1.SessionStateType_SESSION_STATE_TYPE_RUNNING) ErrorSessionStateType = SessionStateType(sessionsv1.SessionStateType_SESSION_STATE_TYPE_ERROR) CompletedSessionStateType = SessionStateType(sessionsv1.SessionStateType_SESSION_STATE_TYPE_COMPLETED) )
const BuildIDKind = "b"
const ConnectionIDKind = "connection"
const DeploymentIDKind = "d"
const EnvIDKind = "e"
const EventIDKind = "event"
const IntegrationIDKind = "integration"
const MappingEntrypointIDKind = "meid"
const MappingIDKind = "m"
const ProjectIDKind = "p"
const RunIDKind = "run"
const SessionIDKind = "s"
Variables ¶
var ( BuildFromProto = makeFromProto(validateBuild) StrictBuildFromProto = makeFromProto(strictValidateBuild) ToStrictBuild = makeWithValidator(strictValidateBuild) )
var ( BuildArtifactFromProto = makeFromProto(validateBuildArtifact) StrictBuildArtifactFromProto = makeFromProto(strictValidateBuildArtifact) ToStrictBuildArtifact = makeWithValidator(strictValidateBuildArtifact) )
var ( CallFrameFromProto = makeFromProto(validateCallFrame) StrictCallFrameFromProto = makeFromProto(strictValidateCallFrame) ToStrictCallFrame = makeWithValidator(strictValidateCallFrame) )
var ( CodeLocationFromProto = makeFromProto(validateCodeLocation) StrictCodeLocationFromProto = makeFromProto(strictValidateCodeLocation) ToStrictCodeLocation = makeWithValidator(strictValidateCodeLocation) )
var ( ConnectionFromProto = makeFromProto(validateConnection) StrictConnectionFromProto = makeFromProto(strictValidateConnection) ToStrictConnection = makeWithValidator(strictValidateConnection) )
var ( DeploymentFromProto = makeFromProto(validateDeployment) StrictDeploymentFromProto = makeFromProto(strictValidateDeployment) ToStrictDeployment = makeWithValidator(strictValidateDeployment) )
var ( EnvFromProto = makeFromProto(validateEnv) StrictEnvFromProto = makeFromProto(strictValidateEnv) ToStrictEnv = makeWithValidator(strictValidateEnv) )
var ( EnvVarFromProto = makeFromProto(validateEnvVar) StrictEnvVarFromProto = makeFromProto(strictValidateEnvVar) ToStrictEnvVar = makeWithValidator(strictValidateEnvVar) )
var ( EventFromProto = makeFromProto(validateEvent) StrictEventFromProto = makeFromProto(strictValidateEvent) ToStrictEvent = makeWithValidator(strictValidateEvent) )
var ( EventRecordFromProto = makeFromProto(validateEventRecord) StrictEventRecordFromProto = makeFromProto(strictValidateEventRecord) ToStrictEventRecord = makeWithValidator(strictValidateEventRecord) )
var ( ExportFromProto = makeFromProto(validateExport) StrictExportFromProto = makeFromProto(strictValidateExport) ToStrictExport = makeWithValidator(strictValidateExport) )
var ( IntegrationFromProto = makeFromProto(validateIntegration) StrictIntegrationFromProto = makeFromProto(strictValidateIntegration) ToStrictIntegration = makeWithValidator(strictValidateIntegration) )
var ( MappingFromProto = makeFromProto(validateMapping) StrictMappingFromProto = makeFromProto(strictValidateMapping) ToStrictMapping = makeWithValidator(strictValidateMapping) )
var ( MappingEventFromProto = makeFromProto(validateMappingEvent) StrictMappingEventFromProto = makeFromProto(strictValidateMappingEvent) ToStrictMappingEvent = makeWithValidator(strictValidateMappingEvent) )
var ( ModuleFromProto = makeFromProto(validateModule) StrictModuleFromProto = makeFromProto(strictValidateModule) ToStrictModule = makeWithValidator(strictValidateModule) )
var ( ModuleFunctionFromProto = makeFromProto(validateModuleFunction) StrictModuleFunctionFromProto = makeFromProto(strictValidateModuleFunction) ToStrictModuleFunction = makeWithValidator(strictValidateModuleFunction) )
var ( ModuleVariableFromProto = makeFromProto(validateModuleVariable) StrictModuleVariableFromProto = makeFromProto(strictValidateModuleVariable) ToStrictModuleVariable = makeWithValidator(strictValidateModuleVariable) )
var ( ProgramErrorFromProto = makeFromProto(validateProgramError) StrictProgramErrorFromProto = makeFromProto(strictValidateProgramError) ToStrictProgramError = makeWithValidator(strictValidateProgramError) )
var ( ProjectFromProto = makeFromProto(validateProject) StrictProjectFromProto = makeFromProto(strictValidateProject) ToStrictProject = makeWithValidator(strictValidateProject) )
var ( RequirementFromProto = makeFromProto(validateRequirement) StrictRequirementFromProto = makeFromProto(strictValidateRequirement) ToStrictRequirement = makeWithValidator(strictValidateRequirement) )
var ( NewIdleRunStatus = func() RunStatus { return idleRunState } NewRunningRunStatus = func() RunStatus { return runningRunState } LoadWaitRunStateFromProto = makeFromProto[*runtimesv1.RunStatus_LoadWait](nil) NewLoadWaitRunStatus = func(path string) RunStatus { return NewRunStatus(kittehs.Must1(LoadWaitRunStateFromProto(&runtimesv1.RunStatus_LoadWait{Path: path}))) } CompletedRunStateFromProto = makeFromProto(validateCompletedRunState) NewCompletedRunStatus = func(m map[string]Value) RunStatus { return NewRunStatus(kittehs.Must1(CompletedRunStateFromProto(&runtimesv1.RunStatus_Completed{ Values: StringValueMapToProto(m), }))) } ErrorRunStateFromProto = makeFromProto[*runtimesv1.RunStatus_Error](nil) NewErrorRunStatus = func(errs []ProgramError) RunStatus { return NewRunStatus(kittehs.Must1(ErrorRunStateFromProto(&runtimesv1.RunStatus_Error{ Errors: kittehs.Transform(errs, func(e ProgramError) *ProgramErrorPB { return e.ToProto() }), }))) } CallWaitRunStateFromProto = makeFromProto(validateCallWaitRunState) NewCallWaitRunStatus = func(call Value, args []Value, kwargs map[string]Value) RunStatus { return NewRunStatus(kittehs.Must1(CallWaitRunStateFromProto(&runtimesv1.CallWait{ Call: call.ToProto(), Args: kittehs.Transform(args, func(v Value) *ValuePB { return v.ToProto() }), Kwargs: StringValueMapToProto(kwargs), }))) } )
var ( RunStatusFromProto = makeFromProto(validateRunStatus) StrictRunStatusFromProto = makeFromProto(strictValidateRunStatus) ToStrictRunStatus = makeWithValidator(strictValidateRunStatus) )
var ( RuntimeFromProto = makeFromProto(validateRuntime) StrictRuntimeFromProto = makeFromProto(strictValidateRuntime) ToStrictRuntime = makeWithValidator(strictValidateRuntime) )
var ( SessionFromProto = makeFromProto(validateSession) StrictSessionFromProto = makeFromProto(strictValidateSession) ToStrictSession = makeWithValidator(strictValidateSession) )
var ( SessionCallFromProto = makeFromProto(validateSessionCall) StrictSessionCallFromProto = makeFromProto(strictValidateSessionCall) ToStrictSessionCall = makeWithValidator(strictValidateSessionCall) )
var ( SessionCallAttemptCompleteFromProto = makeFromProto(validateSessionCallAttemptComplete) StrictSessionCallAttemptCompleteFromProto = makeFromProto(strictValidateSessionCallAttemptComplete) ToStrictSessionCallAttemptComplete = makeWithValidator(strictValidateSessionCallAttemptComplete) )
var ( SessionCallAttemptResultFromProto = makeFromProto(validateSessionCallAttemptResult) StrictSessionCallAttemptResultFromProto = makeFromProto(strictValidateSessionCallAttemptResult) ToStrictSessionCallAttemptResult = makeWithValidator(strictValidateSessionCallAttemptResult) )
var ( SessionCallAttemptStartFromProto = makeFromProto(validateSessionCallAttemptStart) StrictSessionCallAttemptStartFromProto = makeFromProto(strictValidateSessionCallAttemptStart) ToStrictSessionCallAttemptStart = makeWithValidator(strictValidateSessionCallAttemptStart) )
var ( SessionCallSpecFromProto = makeFromProto(validateSessionCallSpec) StrictSessionCallSpecFromProto = makeFromProto(strictValidateSessionCallSpec) ToStrictSessionCallSpec = makeWithValidator(strictValidateSessionCallSpec) )
var ( SessionLogFromProto = makeFromProto(validateSessionLog) StrictSessionLogFromProto = makeFromProto(strictValidateSessionLog) ToStrictSessionLog = makeWithValidator(strictValidateSessionLog) )
var ( SessionLogRecordFromProto = makeFromProto(validateSessionLogRecord) StrictSessionLogRecordFromProto = makeFromProto(strictValidateSessionLogRecord) ToStrictSessionLogRecord = makeWithValidator(strictValidateSessionLogRecord) )
var ( SessionStateFromProto = makeFromProto(validateSessionState) StrictSessionStateFromProto = makeFromProto(strictValidateSessionState) ToStrictSessionState = makeWithValidator(strictValidateSessionState) )
var ( NewCreatedSessionState = func() CreatedSessionState { return createdSessionState } RunningSessionStateFromProto = makeFromProto(validateRunningSessionState) NewRunningSessionState = func(runID RunID, callv Value) RunningSessionState { return kittehs.Must1(RunningSessionStateFromProto(&sessionsv1.SessionState_Running{ RunId: runID.String(), Call: ToProto(callv), })) } ErrorSessionStateFromProto = makeFromProto(validateErrorSessionState) NewErrorSessionState = func(err error, prints []string) ErrorSessionState { return kittehs.Must1( ErrorSessionStateFromProto( &sessionsv1.SessionState_Error{ Error: ProgramErrorFromError(err).ToProto(), Prints: prints, }, ), ) } CompletedSessionStateFromProto = makeFromProto(validateCompletedSessionState) NewCompletedSessionState = func(prints []string, exports map[string]Value, ret Value) (CompletedSessionState, error) { return CompletedSessionStateFromProto(&sessionsv1.SessionState_Completed{ Prints: prints, Exports: kittehs.TransformMapValues(exports, ToProto), ReturnValue: ret.ToProto(), }) } )
var ( MustValueFromProto = makeMustFromProto(ValidateValuePB) ToStrictValue = makeWithValidator(StrictValidateValuePB) )
var ( IsNothingValue = isValueOfType[NothingValue] IsBooleanValue = isValueOfType[BooleanValue] IsStringValue = isValueOfType[StringValue] IsIntegerValue = isValueOfType[IntegerValue] IsBytesValue = isValueOfType[BytesValue] IsFloatValue = isValueOfType[FloatValue] IsDurationValue = isValueOfType[DurationValue] IsTimeValue = isValueOfType[TimeValue] IsSymbolValue = isValueOfType[SymbolValue] IsListValue = isValueOfType[ListValue] IsSetValue = isValueOfType[SetValue] IsDictValue = isValueOfType[DictValue] IsStructValue = isValueOfType[StructValue] IsModuleValue = isValueOfType[ModuleValue] IsFunctionValue = isValueOfType[FunctionValue] )
var ( NewNothingValue = func() Value { return MustNewValue(nothingValue) } BooleanValueFromProto = makeFromProto[*valuesv1.Boolean](nil) NewBooleanValue = func(v bool) Value { return MustNewValue(kittehs.Must1(BooleanValueFromProto(&valuesv1.Boolean{V: v}))) } StringValueFromProto = makeFromProto[*valuesv1.String](nil) NewStringValue = func(v string) Value { return MustNewValue(kittehs.Must1(StringValueFromProto(&valuesv1.String{V: v}))) } IntegerValueFromProto = makeFromProto[*valuesv1.Integer](nil) NewIntegerValue = func(v int64) Value { return MustNewValue(kittehs.Must1(IntegerValueFromProto(&valuesv1.Integer{V: v}))) } BytesValueFromProto = makeFromProto[*valuesv1.Bytes](nil) NewBytesValue = func(v []byte) Value { return MustNewValue(kittehs.Must1(BytesValueFromProto(&valuesv1.Bytes{V: v}))) } FloatValueFromProto = makeFromProto[*valuesv1.Float](nil) NewFloatValue = func(v float64) Value { return MustNewValue(kittehs.Must1(FloatValueFromProto(&valuesv1.Float{V: v}))) } SymbolValueFromProto = makeFromProto[*valuesv1.Symbol](nil) NewSymbolValue = func(v Symbol) Value { return MustNewValue(kittehs.Must1(SymbolValueFromProto(&valuesv1.Symbol{Name: v.String()}))) } DurationValueFromProto = makeFromProto[*valuesv1.Duration](nil) NewDurationValue = func(v time.Duration) Value { return MustNewValue(kittehs.Must1(DurationValueFromProto(&valuesv1.Duration{V: durationpb.New(v)}))) } TimeValueFromProto = makeFromProto[*valuesv1.Time](nil) NewTimeValue = func(v time.Time) Value { return MustNewValue(kittehs.Must1(TimeValueFromProto(&valuesv1.Time{V: timestamppb.New(v)}))) } )
var PossibleDeploymentStates = kittehs.Transform(kittehs.MapValuesSortedByKeys(deploymentsv1.DeploymentState_name), func(name string) string { return strings.TrimPrefix(name, "DEPLOYMENT_STATE_") })
var PossibleEventRecordStates = kittehs.Transform(kittehs.MapValuesSortedByKeys(eventsv1.EventState_name), func(name string) string { return strings.TrimPrefix(name, "EVENT_STATE_") })
var PossibleSessionStateTypes = kittehs.Transform(kittehs.MapValuesSortedByKeys(sessionsv1.SessionStateType_name), func(name string) string { return strings.TrimPrefix(name, "SESSION_STATE_TYPE_") })
Functions ¶
func EqualValues ¶
func EventToValues ¶
func FunctionValueHasFlag ¶
func FunctionValueHasFlag(v Value, flag FunctionFlag) bool
func GetBooleanValue ¶
func GetBuildArtifactCompiledData ¶
func GetBuildArtifactCompiledData(p BuildArtifact) map[string][]byte
func GetBuildCreatedAt ¶
func GetBytesValue ¶
func GetCodeLocationCanonicalString ¶
func GetCodeLocationCanonicalString(l CodeLocation) string
func GetCodeLocationName ¶
func GetCodeLocationName(l CodeLocation) string
func GetCodeLocationPath ¶
func GetCodeLocationPath(l CodeLocation) string
func GetCodeLocationRowCol ¶
func GetCodeLocationRowCol(l CodeLocation) (uint32, uint32)
func GetConnectionIntegrationToken ¶
func GetConnectionIntegrationToken(c Connection) string
func GetDictValueLen ¶
func GetDurationValue ¶
func GetEnvVarValue ¶
func GetEventCreatedAt ¶
func GetEventData ¶
func GetEventMemo ¶
func GetEventRecordCreatedAt ¶
func GetEventRecordCreatedAt(er EventRecord) time.Time
func GetEventRecordSeq ¶
func GetEventRecordSeq(er EventRecord) uint32
func GetEventSequenceNumber ¶
func GetEventType ¶
func GetFloatValue ¶
func GetFunctionValueData ¶
func GetIntegerValue ¶
func GetIntegrationConnectionURL ¶
func GetIntegrationConnectionURL(i Integration) *url.URL
TODO(ENG-346): Connection UI specification instead of a URL.
func GetIntegrationDescription ¶
func GetIntegrationDescription(i Integration) string
func GetIntegrationDisplayName ¶
func GetIntegrationDisplayName(i Integration) string
func GetIntegrationLogoURL ¶
func GetIntegrationLogoURL(i Integration) *url.URL
func GetIntegrationUserLinks ¶
func GetIntegrationUserLinks(i Integration) map[string]*url.URL
func GetLoadWaitRunStatePath ¶
func GetLoadWaitRunStatePath(l LoadWaitRunState) string
func GetMappingEventType ¶
func GetMappingEventType(me MappingEvent) string
func GetModuleFunctionDescription ¶
func GetModuleFunctionDescription(i ModuleFunction) string
func GetModuleFunctions ¶
func GetModuleFunctions(m Module) map[string]ModuleFunction
func GetModuleVariableDescription ¶
func GetModuleVariableDescription(i ModuleVariable) string
func GetModuleVariables ¶
func GetModuleVariables(m Module) map[string]ModuleVariable
func GetObjectHash ¶
func GetOriginalEventID ¶
func GetProgramErrorExtra ¶
func GetProgramErrorExtra(e ProgramError) map[string]string
func GetProgramErrorMessage ¶
func GetProgramErrorMessage(e ProgramError) string
func GetProjectResourcePaths ¶
func GetRequirementURL ¶
func GetRequirementURL(r Requirement) *url.URL
func GetSessionCallResultError ¶
func GetSessionCallResultError(r SessionCallAttemptResult) error
func GetSessionCallSpecData ¶
func GetSessionCallSpecData(v SessionCallSpec) (Value, []Value, map[string]Value)
func GetSessionCallSpecSeq ¶
func GetSessionCallSpecSeq(v SessionCallSpec) uint32
func GetSessionHistoryStatePrints ¶
func GetSessionHistoryStatePrints(s SessionState) []string
func GetSessionInputs ¶
func GetSessionLogRecordData ¶
func GetSessionLogRecordData(r SessionLogRecord) any
func GetSessionLogRecordPrint ¶
func GetSessionLogRecordPrint(r SessionLogRecord) string
func GetSessionLogRecordTimestamp ¶
func GetSessionLogRecordTimestamp(record SessionLogRecord) time.Time
func GetSessionMemo ¶
func GetStringValue ¶
func GetTimeValue ¶
func GetValueLength ¶
func IsEnvVarSecret ¶
func IsID ¶
IsID returns if s might be an ID, not a valid ID.
In the CLI, UI, or even some routes we might want to get a ref by either a handle or an ID. For that, we need to understand what the user intended to put, and if it's an invalid ID - still treat it as an ID and say "this is an invalid ID".
func IsValidName ¶
func NewSequentialIDGeneratorForTesting ¶
To be used for testing only, when we expect a certain ID. First ID generated will be init+1.
func ObjectToString ¶
func ProgramErrorToError ¶
func ProgramErrorToError(e ProgramError) error
func ProjectHasID ¶
func SetIDGenerator ¶
func SetIDGenerator(f func() string)
func SplitRawID ¶
func StrictValidateValuePB ¶
func UUIDGenerator ¶
func UUIDGenerator() string
func ValidateValuePB ¶
Types ¶
type BooleanValue ¶
type BuildArtifact ¶
type BuildArtifact = *object[*BuildArtifactPB]
func BuildArtifactReplaceCompiledData ¶
func BuildArtifactReplaceCompiledData(p BuildArtifact, f func([]byte) []byte) BuildArtifact
type BuildArtifactPB ¶
type BuildArtifactPB = runtimesv1.BuildArtifact
type BuildID ¶
type BuildID = *id[BuildIDTraits]
func GetBuildID ¶
func GetDeploymentBuildID ¶
func GetDeploymentBuildID(e Deployment) BuildID
func NewBuildID ¶
func NewBuildID() BuildID
func ParseBuildID ¶
func StrictParseBuildID ¶
type BuildIDTraits ¶
type BuildIDTraits struct{}
func (BuildIDTraits) Kind ¶
func (BuildIDTraits) Kind() string
func (BuildIDTraits) ValidateValue ¶
func (BuildIDTraits) ValidateValue(raw string) error
type BytesValue ¶
type CallFrame ¶
type CallFrame = *object[*CallFramePB]
func GetProgramErrorCallFrameAt ¶
func GetProgramErrorCallFrameAt(e ProgramError, i int) CallFrame
i=0: innermost. i=-1: outermost.
func GetProgramErrorCallStack ¶
func GetProgramErrorCallStack(e ProgramError) []CallFrame
func GetProgramErrorInnermostCallFrame ¶
func GetProgramErrorInnermostCallFrame(e ProgramError) CallFrame
func GetProgramErrorOutermostCallFrame ¶
func GetProgramErrorOutermostCallFrame(e ProgramError) CallFrame
type CallFramePB ¶
type CallWaitRunState ¶
type CallWaitRunState = *object[*runtimesv1.CallWait]
This is a bit special as it is reused in RunRequest.
type CodeLocation ¶
type CodeLocation = *object[*CodeLocationPB]
func GetExportCodeLocation ¶
func GetExportCodeLocation(e Export) CodeLocation
func GetMappingEventCodeLocation ¶
func GetMappingEventCodeLocation(me MappingEvent) CodeLocation
func GetRequirementCodeLocation ¶
func GetRequirementCodeLocation(r Requirement) CodeLocation
func GetSessionEntryPoint ¶
func GetSessionEntryPoint(e Session) CodeLocation
func ParseCodeLocation ¶
func ParseCodeLocation(s string) (CodeLocation, error)
func StrictParseCodeLocation ¶
func StrictParseCodeLocation(s string) (CodeLocation, error)
type CodeLocationPB ¶
type CodeLocationPB = programv1.CodeLocation
type CompletedRunState ¶
type CompletedRunState = *object[*runtimesv1.RunStatus_Completed]
type CompletedSessionState ¶
type CompletedSessionState = *object[*sessionsv1.SessionState_Completed]
type Connection ¶
type Connection = *object[*ConnectionPB]
type ConnectionID ¶
type ConnectionID = *id[connectionIDTraits]
func GetConnectionID ¶
func GetConnectionID(c Connection) ConnectionID
func GetMappingConnectionID ¶
func GetMappingConnectionID(m Mapping) ConnectionID
func NewConnectionID ¶
func NewConnectionID() ConnectionID
func ParseConnectionID ¶
func ParseConnectionID(raw string) (ConnectionID, error)
func StrictParseConnectionID ¶
func StrictParseConnectionID(raw string) (ConnectionID, error)
type ConnectionPB ¶
type ConnectionPB = connectionsv1.Connection
type CreatedSessionState ¶
type CreatedSessionState = *object[*sessionsv1.SessionState_Created]
type Deployment ¶
type Deployment = *object[*DeploymentPB]
func DeploymentWithoutTimes ¶
func DeploymentWithoutTimes(d Deployment) Deployment
type DeploymentID ¶
type DeploymentID = *id[deploymentIDTraits]
func GetDeploymentID ¶
func GetDeploymentID(e Deployment) DeploymentID
func GetSessionDeploymentID ¶
func GetSessionDeploymentID(e Session) DeploymentID
func NewDeploymentID ¶
func NewDeploymentID() DeploymentID
func ParseDeploymentID ¶
func ParseDeploymentID(raw string) (DeploymentID, error)
func StrictParseDeploymentID ¶
func StrictParseDeploymentID(raw string) (DeploymentID, error)
type DeploymentPB ¶
type DeploymentPB = deploymentsv1.Deployment
type DeploymentSessionsStats ¶
type DeploymentSessionsStats = deploymentsv1.Deployment_SessionStats
type DeploymentState ¶
type DeploymentState deploymentsv1.DeploymentState
func DeploymentStateFromProto ¶
func DeploymentStateFromProto(s deploymentsv1.DeploymentState) (DeploymentState, error)
func GetDeploymentState ¶
func GetDeploymentState(e Deployment) DeploymentState
func ParseDeploymentState ¶
func ParseDeploymentState(raw string) DeploymentState
func (DeploymentState) String ¶
func (s DeploymentState) String() string
func (DeploymentState) ToProto ¶
func (s DeploymentState) ToProto() deploymentsv1.DeploymentState
type DictValueItem ¶
type DictValueItem struct{ K, V Value }
func GetDictValue ¶
func GetDictValue(v Value) []*DictValueItem
type DurationValue ¶
type EnvID ¶
type EnvID = *id[envIDTraits]
func GetDeploymentEnvID ¶
func GetDeploymentEnvID(e Deployment) EnvID
func GetEnvVarEnvID ¶
func GetMappingEnvID ¶
func ParseEnvID ¶
func StrictParseEnvID ¶
type ErrorRunState ¶
type ErrorRunState = *object[*runtimesv1.RunStatus_Error]
type ErrorSessionState ¶
type ErrorSessionState = *object[*sessionsv1.SessionState_Error]
type EventID ¶
type EventID = *id[eventIDTraits]
func GetEventID ¶
func GetEventRecordEventID ¶
func GetEventRecordEventID(er EventRecord) EventID
func GetSessionEventID ¶
func NewEventID ¶
func NewEventID() EventID
func ParseEventID ¶
func StrictParseEventID ¶
type EventRecord ¶
type EventRecord = *object[*EventRecordPB]
type EventRecordPB ¶
type EventRecordPB = eventsv1.EventRecord
type EventState ¶
type EventState eventsv1.EventState
func GetEventRecordState ¶
func GetEventRecordState(er EventRecord) EventState
func ParseEventRecordState ¶
func ParseEventRecordState(raw string) EventState
func (EventState) String ¶
func (s EventState) String() string
func (EventState) ToProto ¶
func (s EventState) ToProto() eventsv1.EventState
type ExecutorID ¶
type ExecutorID = *executorID
func GetFunctionValueExecutorID ¶
func GetFunctionValueExecutorID(v Value) ExecutorID
func MustParseExecutorID ¶
func MustParseExecutorID(raw string) ExecutorID
func NewExecutorID ¶
func NewExecutorID[T executorIDConstraint](id T) ExecutorID
func ParseExecutorID ¶
func ParseExecutorID(raw string) (ExecutorID, error)
func StrictParseExecutorID ¶
func StrictParseExecutorID(raw string) (ExecutorID, error)
type Export ¶
type Export = *object[*ExportPB]
func GetBuildArtifactExports ¶
func GetBuildArtifactExports(p BuildArtifact) []Export
type ExportPB ¶
type ExportPB = runtimesv1.Export
type FloatValue ¶
type FunctionFlag ¶
type FunctionFlag string
const ( PrivilidgedFunctionFlag FunctionFlag = "privilidged" // pass workflow context. PureFunctionFlag FunctionFlag = "pure" // do not run in an activity. DisablePollingFunctionFlag FunctionFlag = "no-poll" // do not poll. )
func GetFunctionValueFlags ¶
func GetFunctionValueFlags(v Value) []FunctionFlag
func (FunctionFlag) String ¶
func (ff FunctionFlag) String() string
type FunctionValue ¶
func FunctionValueFromProto ¶
func FunctionValueFromProto(pb *valuesv1.Function) (FunctionValue, error)
func GetFunctionValue ¶
func GetFunctionValue(v Value) FunctionValue
type ID ¶
type ID interface { fmt.Stringer json.Marshaler json.Unmarshaler Kind() string Value() string // contains filtered or unexported methods }
func ParseAnyID ¶
func StrictParseAnyID ¶
type IdleRunState ¶
type IdleRunState = *object[*runtimesv1.RunStatus_Idle]
type IntegerValue ¶
type Integration ¶
type Integration = *object[*IntegrationPB]
type IntegrationID ¶
type IntegrationID = *id[integrationIDTraits]
func GetConnectionIntegrationID ¶
func GetConnectionIntegrationID(c Connection) IntegrationID
func GetEventIntegrationID ¶
func GetEventIntegrationID(e Event) IntegrationID
func GetIntegrationID ¶
func GetIntegrationID(i Integration) IntegrationID
func IntegrationIDFromName ¶
func IntegrationIDFromName(name string) IntegrationID
func NewIntegrationID ¶
func NewIntegrationID() IntegrationID
func ParseIntegrationID ¶
func ParseIntegrationID(raw string) (IntegrationID, error)
func StrictParseIntegrationID ¶
func StrictParseIntegrationID(raw string) (IntegrationID, error)
type IntegrationPB ¶
type IntegrationPB = integrationsv1.Integration
type LoadWaitRunState ¶
type LoadWaitRunState = *object[*runtimesv1.RunStatus_LoadWait]
type MappingEntrypointID ¶
type MappingEntrypointID = *id[mappingEntrypointIDTraits]
func NewEMappingEntrypointD ¶
func NewEMappingEntrypointD() MappingEntrypointID
func ParseMappingEntrypointID ¶
func ParseMappingEntrypointID(raw string) (MappingEntrypointID, error)
func StrictParseMappingEntrypointID ¶
func StrictParseMappingEntrypointID(raw string) (MappingEntrypointID, error)
type MappingEvent ¶
type MappingEvent = *object[*MappingEventPB]
func GetMappingEvents ¶
func GetMappingEvents(m Mapping) []MappingEvent
type MappingEventPB ¶
type MappingEventPB = mappingsv1.MappingEvent
type MappingID ¶
type MappingID = *id[mappingIDTraits]
func GetMappingID ¶
func NewMappingID ¶
func NewMappingID() MappingID
func ParseMappingID ¶
func StrictParseMappingID ¶
type MappingPB ¶
type MappingPB = mappingsv1.Mapping
type Module ¶
type Module = *object[*ModulePB]
func GetIntegrationModule ¶
func GetIntegrationModule(i Integration) Module
func NewModule ¶
func NewModule(funcs map[string]ModuleFunction, vars map[string]ModuleVariable) Module
type ModuleFunction ¶
type ModuleFunction = *object[*ModuleFunctionPB]
type ModuleFunctionFieldPB ¶
type ModuleFunctionFieldPB = programv1.FunctionField
type ModuleFunctionPB ¶
type ModuleValue ¶
func ModuleValueFromProto ¶
func ModuleValueFromProto(pb *valuesv1.Module) (ModuleValue, error)
type ModuleVariable ¶
type ModuleVariable = *object[*ModuleVariablePB]
type ModuleVariablePB ¶
type Name ¶
type Name = *name
func GetConnectionName ¶
func GetConnectionName(c Connection) Name
func GetEnvName ¶
func GetIntegrationUniqueName ¶
func GetIntegrationUniqueName(i Integration) Name
func GetProjectName ¶
func GetRuntimeName ¶
func StrictParseName ¶
type NothingValue ¶
type Object ¶
type Object interface {
// contains filtered or unexported methods
}
func GetRunState ¶
func UnwrapSessionState ¶
func UnwrapSessionState(s SessionState) Object
type ProgramError ¶
type ProgramError = *object[*ProgramErrorPB]
func NewProgramError ¶
func ProgramErrorFromError ¶
func ProgramErrorFromError(err error) ProgramError
type ProgramErrorAsError ¶
type ProgramErrorAsError struct{ ProgramError }
func (ProgramErrorAsError) Error ¶
func (e ProgramErrorAsError) Error() string
type ProgramErrorPB ¶
type ProjectID ¶
type ProjectID = *id[projectIDTraits]
func GetBuildProjectID ¶
func GetConnectionProjectID ¶
func GetConnectionProjectID(c Connection) ProjectID
func GetEnvProjectID ¶
func GetProjectID ¶
func MustParseProjectID ¶
func NewProjectID ¶
func NewProjectID() ProjectID
func ParseProjectID ¶
func StrictParseProjectID ¶
type Requirement ¶
type Requirement = *object[*RequirementPB]
func GetBuildArtifactRequirements ¶
func GetBuildArtifactRequirements(p BuildArtifact) []Requirement
func NewRequirement ¶
func NewRequirement(loc CodeLocation, url *url.URL, symbol Symbol) (Requirement, error)
type RequirementPB ¶
type RequirementPB = runtimesv1.Requirement
type RunID ¶
type RunID = *id[runIDTraits]
func GetSessionStateRunID ¶
func GetSessionStateRunID(s SessionState) RunID
func ParseRunID ¶
func StrictParseRunID ¶
type RunStatusPB ¶
type RunStatusPB = runtimesv1.RunStatus
type RunningRunState ¶
type RunningRunState = *object[*runtimesv1.RunStatus_Running]
type RunningSessionState ¶
type RunningSessionState = *object[*sessionsv1.SessionState_Running]
type RuntimePB ¶
type RuntimePB = runtimesv1.Runtime
type Session ¶
type Session = *object[*SessionPB]
func NewSession ¶
func NewSession(deploymentID DeploymentID, parentSessionID SessionID, eventID EventID, ep CodeLocation, inputs map[string]Value, memo map[string]string) Session
type SessionCall ¶
type SessionCall = *object[*SessionCallPB]
type SessionCallAttemptComplete ¶
type SessionCallAttemptComplete = *object[*SessionCallAttemptCompletePB]
func NewSessionCallAttemptComplete ¶
func NewSessionCallAttemptComplete(last bool, retryInterval time.Duration, result SessionCallAttemptResult) SessionCallAttemptComplete
type SessionCallAttemptCompletePB ¶
type SessionCallAttemptCompletePB = sessionsv1.Call_Attempt_Complete
type SessionCallAttemptResult ¶
type SessionCallAttemptResult = *object[*SessionCallAttemptResultPB]
func GetSessionCallAttemptCompleteResult ¶
func GetSessionCallAttemptCompleteResult(c SessionCallAttemptComplete) SessionCallAttemptResult
func NewSessionCallAttemptErrorResult ¶
func NewSessionCallAttemptErrorResult(err error) SessionCallAttemptResult
func NewSessionCallAttemptResult ¶
func NewSessionCallAttemptResult(v Value, err error) SessionCallAttemptResult
func NewSessionCallAttemptValueResult ¶
func NewSessionCallAttemptValueResult(v Value) SessionCallAttemptResult
type SessionCallAttemptResultPB ¶
type SessionCallAttemptResultPB = sessionsv1.Call_Attempt_Result
type SessionCallAttemptStart ¶
type SessionCallAttemptStart = *object[*SessionCallAttemptStartPB]
type SessionCallAttemptStartPB ¶
type SessionCallAttemptStartPB = sessionsv1.Call_Attempt_Start
type SessionCallPB ¶
type SessionCallPB = sessionsv1.Call
type SessionCallSpecPB ¶
type SessionCallSpecPB = sessionsv1.Call_Spec
type SessionID ¶
type SessionID = *id[SessionIDTraits]
func GetParentSessionID ¶
func GetSessionID ¶
func NewSessionID ¶
func NewSessionID() SessionID
func ParseSessionID ¶
func StrictParseSessionID ¶
type SessionIDTraits ¶
type SessionIDTraits struct{}
func (SessionIDTraits) Kind ¶
func (SessionIDTraits) Kind() string
func (SessionIDTraits) ValidateValue ¶
func (SessionIDTraits) ValidateValue(raw string) error
type SessionLog ¶
type SessionLog = *object[*SessionLogPB]
func NewSessionLog ¶
func NewSessionLog(rs []SessionLogRecord) SessionLog
type SessionLogPB ¶
type SessionLogPB = sessionsv1.SessionLog
type SessionLogRecord ¶
type SessionLogRecord = *object[*SessionLogRecordPB]
func NewCallAttemptCompleteSessionLogRecord ¶
func NewCallAttemptCompleteSessionLogRecord(complete SessionCallAttemptComplete) SessionLogRecord
func NewCallAttemptStartSessionLogRecord ¶
func NewCallAttemptStartSessionLogRecord(start SessionCallAttemptStart) SessionLogRecord
func NewCallSpecSessionLogRecord ¶
func NewCallSpecSessionLogRecord(spec SessionCallSpec) SessionLogRecord
func NewPrintSessionLogRecord ¶
func NewPrintSessionLogRecord(print string) SessionLogRecord
func NewSessionLogCallAttemptComplete ¶
func NewSessionLogCallAttemptComplete(spec SessionCallAttemptComplete) SessionLogRecord
func NewSessionLogCallAttemptStart ¶
func NewSessionLogCallAttemptStart(spec SessionCallAttemptStart) SessionLogRecord
func NewSessionLogCallSpec ¶
func NewSessionLogCallSpec(spec SessionCallSpec) SessionLogRecord
func NewSessionLogPrint ¶
func NewSessionLogPrint(print string) SessionLogRecord
func NewSessionLogState ¶
func NewSessionLogState(state SessionState) SessionLogRecord
func NewStateSessionLogRecord ¶
func NewStateSessionLogRecord(state SessionState) SessionLogRecord
type SessionLogRecordPB ¶
type SessionLogRecordPB = sessionsv1.SessionLogRecord
type SessionPB ¶
type SessionPB = sessionsv1.Session
type SessionState ¶
type SessionState = *object[*SessionStatePB]
func GetSessionLogRecordState ¶
func GetSessionLogRecordState(r SessionLogRecord) SessionState
func SessionStateWithTimestamp ¶
func SessionStateWithTimestamp(s SessionState, t time.Time) SessionState
func WrapSessionState ¶
func WrapSessionState(s Object) SessionState
type SessionStatePB ¶
type SessionStatePB = sessionsv1.SessionState // TODO: WrappedState?
type SessionStateType ¶
type SessionStateType sessionsv1.SessionStateType
func GetSessionLatestState ¶
func GetSessionLatestState(e Session) SessionStateType
func GetSessionStateType ¶
func GetSessionStateType(s SessionState) SessionStateType
func ParseSessionStateType ¶
func ParseSessionStateType(raw string) SessionStateType
func SessionStateTypeFromProto ¶
func SessionStateTypeFromProto(s sessionsv1.SessionStateType) (SessionStateType, error)
func (SessionStateType) String ¶
func (s SessionStateType) String() string
func (SessionStateType) ToProto ¶
func (s SessionStateType) ToProto() sessionsv1.SessionStateType
type StringValue ¶
type StructValue ¶
func StructValueFromProto ¶
func StructValueFromProto(pb *valuesv1.Struct) (StructValue, error)
type Symbol ¶
type Symbol = *symbol
func GetEnvVarName ¶
func GetExportSymbol ¶
func GetFunctionValueName ¶
func GetMappingModuleName ¶
func GetRequirementSymbol ¶
func GetRequirementSymbol(r Requirement) Symbol
func GetSymbolValue ¶
func ParseSymbol ¶
func StrictParseSymbol ¶
type SymbolValue ¶
type Value ¶
type Value = *object[*ValuePB]
func GetDictValueKeys ¶
func GetListValue ¶
func GetSessionCallResultValue ¶
func GetSessionCallResultValue(r SessionCallAttemptResult) Value
func GetSessionStateCallValue ¶
func GetSessionStateCallValue(s SessionState) Value
func GetSetValue ¶
func MustNewValue ¶
func NewDictValue ¶
func NewDictValue(items []*DictValueItem) Value
Creates a new Dict Value. Dictionary items are stored sorted by their string representation of their key.
func NewFunctionValue ¶
func NewFunctionValue(xid ExecutorID, name string, data []byte, flags []FunctionFlag, desc ModuleFunction) Value
func NewListValue ¶
func NewSetValue ¶
func SessionCallResultAsPair ¶
func SessionCallResultAsPair(r SessionCallAttemptResult) (Value, error)
func StrictValueFromProto ¶
func ValueFromProto ¶
Source Files
¶
- build.go
- build_artifact.go
- build_id.go
- callframe.go
- code_location.go
- connection.go
- connection_id.go
- deployment.go
- deployment_id.go
- doc.go
- env.go
- env_id.go
- envvar.go
- event.go
- event_id.go
- event_record.go
- executor_id.go
- export.go
- id.go
- id_generator.go
- integration.go
- integration_id.go
- mapping.go
- mapping_entrypoint_id.go
- mapping_event.go
- mapping_id.go
- module.go
- module_function.go
- module_variable.go
- name.go
- object.go
- program_error.go
- project.go
- project_id.go
- requirement.go
- run_id.go
- run_states.go
- run_status.go
- runtime.go
- session.go
- session_call.go
- session_call_attempt_complete.go
- session_call_attempt_result.go
- session_call_attempt_start.go
- session_call_spec.go
- session_id.go
- session_log.go
- session_log_record.go
- session_state_type.go
- session_states.go
- symbol.go
- uuid.go
- validation_errors.go
- value.go
- values.go