pb

package
v1.39.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Actions_Run_FullMethodName     = "/pb.Actions/Run"
	Actions_Cleanup_FullMethodName = "/pb.Actions/Cleanup"
)

Variables

View Source
var Actions_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.Actions",
	HandlerType: (*ActionsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Run",
			Handler:    _Actions_Run_Handler,
		},
		{
			MethodName: "Cleanup",
			Handler:    _Actions_Cleanup_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/pb/actions.proto",
}

Actions_ServiceDesc is the grpc.ServiceDesc for Actions service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_internal_pb_actions_proto protoreflect.FileDescriptor

Functions

func RegisterActionsServer

func RegisterActionsServer(s grpc.ServiceRegistrar, srv ActionsServer)

Types

type ActionsClient

type ActionsClient interface {
	Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (*RunResponse, error)
	// Cleanup is called once, after the last step of a run, on an action
	// whose action.yml sets cleanup, however many steps used it.
	Cleanup(ctx context.Context, in *CleanupRequest, opts ...grpc.CallOption) (*CleanupResponse, error)
}

ActionsClient is the client API for Actions service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewActionsClient

func NewActionsClient(cc grpc.ClientConnInterface) ActionsClient

type ActionsServer

type ActionsServer interface {
	Run(context.Context, *RunRequest) (*RunResponse, error)
	// Cleanup is called once, after the last step of a run, on an action
	// whose action.yml sets cleanup, however many steps used it.
	Cleanup(context.Context, *CleanupRequest) (*CleanupResponse, error)
}

ActionsServer is the server API for Actions service. All implementations should embed UnimplementedActionsServer for forward compatibility

type CleanupRequest

type CleanupRequest struct {

	// The run of probe that is over, as each step of it was told in Step.
	RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	// contains filtered or unexported fields
}

CleanupRequest tells an action that a run is over, for it to remove what its steps left behind in it.

func (*CleanupRequest) Descriptor deprecated

func (*CleanupRequest) Descriptor() ([]byte, []int)

Deprecated: Use CleanupRequest.ProtoReflect.Descriptor instead.

func (*CleanupRequest) GetRunId

func (x *CleanupRequest) GetRunId() string

func (*CleanupRequest) ProtoMessage

func (*CleanupRequest) ProtoMessage()

func (*CleanupRequest) ProtoReflect

func (x *CleanupRequest) ProtoReflect() protoreflect.Message

func (*CleanupRequest) Reset

func (x *CleanupRequest) Reset()

func (*CleanupRequest) String

func (x *CleanupRequest) String() string

type CleanupResponse

type CleanupResponse struct {
	// contains filtered or unexported fields
}

func (*CleanupResponse) Descriptor deprecated

func (*CleanupResponse) Descriptor() ([]byte, []int)

Deprecated: Use CleanupResponse.ProtoReflect.Descriptor instead.

func (*CleanupResponse) ProtoMessage

func (*CleanupResponse) ProtoMessage()

func (*CleanupResponse) ProtoReflect

func (x *CleanupResponse) ProtoReflect() protoreflect.Message

func (*CleanupResponse) Reset

func (x *CleanupResponse) Reset()

func (*CleanupResponse) String

func (x *CleanupResponse) String() string

type Contract

type Contract struct {

	// What the contract matched the step to; none when it has nothing that
	// matches it.
	Matched *ContractMatch `protobuf:"bytes,1,opt,name=matched,proto3" json:"matched,omitempty"`
	// What the contract does not allow in the request and the response,
	// empty when it allows all of it.
	Violations []*Violation `protobuf:"bytes,2,rep,name=violations,proto3" json:"violations,omitempty"`
	// contains filtered or unexported fields
}

Contract is the check of a step against a contract.

func (*Contract) Descriptor deprecated

func (*Contract) Descriptor() ([]byte, []int)

Deprecated: Use Contract.ProtoReflect.Descriptor instead.

func (*Contract) GetMatched

func (x *Contract) GetMatched() *ContractMatch

func (*Contract) GetViolations

func (x *Contract) GetViolations() []*Violation

func (*Contract) ProtoMessage

func (*Contract) ProtoMessage()

func (*Contract) ProtoReflect

func (x *Contract) ProtoReflect() protoreflect.Message

func (*Contract) Reset

func (x *Contract) Reset()

func (*Contract) String

func (x *Contract) String() string

type ContractMatch

type ContractMatch struct {

	// The contract, such as the path of an OpenAPI document.
	Spec string `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"`
	// The operation, such as GET /users/{id}.
	Operation string `protobuf:"bytes,2,opt,name=operation,proto3" json:"operation,omitempty"`
	// The response the operation declares for the step, such as 200; empty
	// when it declares none.
	Response string `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

ContractMatch is what a contract matched a step to.

func (*ContractMatch) Descriptor deprecated

func (*ContractMatch) Descriptor() ([]byte, []int)

Deprecated: Use ContractMatch.ProtoReflect.Descriptor instead.

func (*ContractMatch) GetOperation

func (x *ContractMatch) GetOperation() string

func (*ContractMatch) GetResponse

func (x *ContractMatch) GetResponse() string

func (*ContractMatch) GetSpec

func (x *ContractMatch) GetSpec() string

func (*ContractMatch) ProtoMessage

func (*ContractMatch) ProtoMessage()

func (*ContractMatch) ProtoReflect

func (x *ContractMatch) ProtoReflect() protoreflect.Message

func (*ContractMatch) Reset

func (x *ContractMatch) Reset()

func (*ContractMatch) String

func (x *ContractMatch) String() string

type Guard

type Guard struct {

	// Whether only what reads is allowed, and nothing that writes.
	ReadOnly bool `protobuf:"varint,1,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
	// The hosts actions may connect to, such as api.example.com,
	// localhost:8080 or *.internal; empty for any.
	AllowHosts []string `protobuf:"bytes,2,rep,name=allow_hosts,json=allowHosts,proto3" json:"allow_hosts,omitempty"`
	// The actions run under the guard although they do not keep to it.
	AllowActions []string `protobuf:"bytes,3,rep,name=allow_actions,json=allowActions,proto3" json:"allow_actions,omitempty"`
	// The kinds of guard each action keeps to itself, such as read-only and
	// allow-host, keyed by the action as a step's uses names it.
	Keeps map[string]*GuardKinds `` /* 137-byte string literal not displayed */
	// contains filtered or unexported fields
}

Guard is what the run allows actions to do, set by whoever runs probe rather than by the workflow. An action that keeps to it refuses what it does not allow; an empty guard allows everything.

func (*Guard) Descriptor deprecated

func (*Guard) Descriptor() ([]byte, []int)

Deprecated: Use Guard.ProtoReflect.Descriptor instead.

func (*Guard) GetAllowActions

func (x *Guard) GetAllowActions() []string

func (*Guard) GetAllowHosts

func (x *Guard) GetAllowHosts() []string

func (*Guard) GetKeeps

func (x *Guard) GetKeeps() map[string]*GuardKinds

func (*Guard) GetReadOnly

func (x *Guard) GetReadOnly() bool

func (*Guard) ProtoMessage

func (*Guard) ProtoMessage()

func (*Guard) ProtoReflect

func (x *Guard) ProtoReflect() protoreflect.Message

func (*Guard) Reset

func (x *Guard) Reset()

func (*Guard) String

func (x *Guard) String() string

type GuardKinds

type GuardKinds struct {
	Kinds []string `protobuf:"bytes,1,rep,name=kinds,proto3" json:"kinds,omitempty"`
	// contains filtered or unexported fields
}

GuardKinds are the kinds of guard an action keeps to.

func (*GuardKinds) Descriptor deprecated

func (*GuardKinds) Descriptor() ([]byte, []int)

Deprecated: Use GuardKinds.ProtoReflect.Descriptor instead.

func (*GuardKinds) GetKinds

func (x *GuardKinds) GetKinds() []string

func (*GuardKinds) ProtoMessage

func (*GuardKinds) ProtoMessage()

func (*GuardKinds) ProtoReflect

func (x *GuardKinds) ProtoReflect() protoreflect.Message

func (*GuardKinds) Reset

func (x *GuardKinds) Reset()

func (*GuardKinds) String

func (x *GuardKinds) String() string

type Process

type Process struct {

	// The process leads a process group of its own, which is stopped with it.
	Pid int64 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
	// The file its output goes to, removed once it is stopped; empty for none.
	Log string `protobuf:"bytes,2,opt,name=log,proto3" json:"log,omitempty"`
	// contains filtered or unexported fields
}

Process is a process an action left running in the background.

func (*Process) Descriptor deprecated

func (*Process) Descriptor() ([]byte, []int)

Deprecated: Use Process.ProtoReflect.Descriptor instead.

func (*Process) GetLog

func (x *Process) GetLog() string

func (*Process) GetPid

func (x *Process) GetPid() int64

func (*Process) ProtoMessage

func (*Process) ProtoMessage()

func (*Process) ProtoReflect

func (x *Process) ProtoReflect() protoreflect.Message

func (*Process) Reset

func (x *Process) Reset()

func (*Process) String

func (x *Process) String() string

type RunRequest

type RunRequest struct {
	With *structpb.Struct `protobuf:"bytes,2,opt,name=with,proto3" json:"with,omitempty"`
	// The state the action left in the job before, for a stateful action.
	State *structpb.Struct `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
	// The step the action runs for.
	Step *Step `protobuf:"bytes,4,opt,name=step,proto3" json:"step,omitempty"`
	// What the run allows the action to do, which the action keeps to.
	Guard *Guard `protobuf:"bytes,5,opt,name=guard,proto3" json:"guard,omitempty"`
	// The names the workflow gives its external actions, each with the action
	// it stands for, for an action that runs steps of its own.
	Actions map[string]string `` /* 141-byte string literal not displayed */
	// Whether the runner cleans up once the run is over: it calls Cleanup of
	// an action whose action.yml asks for it, and of the actions the response
	// names in cleanups.
	Cleanup bool `protobuf:"varint,7,opt,name=cleanup,proto3" json:"cleanup,omitempty"`
	// contains filtered or unexported fields
}

func (*RunRequest) Descriptor deprecated

func (*RunRequest) Descriptor() ([]byte, []int)

Deprecated: Use RunRequest.ProtoReflect.Descriptor instead.

func (*RunRequest) GetActions

func (x *RunRequest) GetActions() map[string]string

func (*RunRequest) GetCleanup

func (x *RunRequest) GetCleanup() bool

func (*RunRequest) GetGuard

func (x *RunRequest) GetGuard() *Guard

func (*RunRequest) GetState

func (x *RunRequest) GetState() *structpb.Struct

func (*RunRequest) GetStep

func (x *RunRequest) GetStep() *Step

func (*RunRequest) GetWith

func (x *RunRequest) GetWith() *structpb.Struct

func (*RunRequest) ProtoMessage

func (*RunRequest) ProtoMessage()

func (*RunRequest) ProtoReflect

func (x *RunRequest) ProtoReflect() protoreflect.Message

func (*RunRequest) Reset

func (x *RunRequest) Reset()

func (*RunRequest) String

func (x *RunRequest) String() string

type RunResponse

type RunResponse struct {
	Result *structpb.Struct `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// The state the action leaves in the job, or none to keep it as it was.
	State *structpb.Struct `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
	// The external actions the action ran that are to be cleaned up once the
	// run is over, each as a step's uses names it in full, for an action that
	// runs steps of its own. A local action is an absolute path here.
	Cleanups []string `protobuf:"bytes,4,rep,name=cleanups,proto3" json:"cleanups,omitempty"`
	// The processes the action left running in the background, for the
	// runner to stop once the run is over.
	Processes []*Process `protobuf:"bytes,5,rep,name=processes,proto3" json:"processes,omitempty"`
	// The check of the step against a contract, such as an OpenAPI
	// document, which the runner takes as the step's test; none when the
	// action checked it against none.
	Contract *Contract `protobuf:"bytes,6,opt,name=contract,proto3" json:"contract,omitempty"`
	// contains filtered or unexported fields
}

func (*RunResponse) Descriptor deprecated

func (*RunResponse) Descriptor() ([]byte, []int)

Deprecated: Use RunResponse.ProtoReflect.Descriptor instead.

func (*RunResponse) GetCleanups

func (x *RunResponse) GetCleanups() []string

func (*RunResponse) GetContract

func (x *RunResponse) GetContract() *Contract

func (*RunResponse) GetProcesses

func (x *RunResponse) GetProcesses() []*Process

func (*RunResponse) GetResult

func (x *RunResponse) GetResult() *structpb.Struct

func (*RunResponse) GetState

func (x *RunResponse) GetState() *structpb.Struct

func (*RunResponse) ProtoMessage

func (*RunResponse) ProtoMessage()

func (*RunResponse) ProtoReflect

func (x *RunResponse) ProtoReflect() protoreflect.Message

func (*RunResponse) Reset

func (x *RunResponse) Reset()

func (*RunResponse) String

func (x *RunResponse) String() string

type Step

type Step struct {

	// The run of probe, the same for every step of every job in it.
	RunId   string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	JobId   string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	JobName string `protobuf:"bytes,3,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"`
	// The position of the step in the job, from 0.
	Index int64 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
	// The id the step is given, or step_ and where it is written in its job
	// when it has none, as step_1.
	Id   string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
	// Which run of a repeated job, from 0.
	Repeat int64 `protobuf:"varint,7,opt,name=repeat,proto3" json:"repeat,omitempty"`
	// Which attempt of a retried step, from 1.
	Attempt int64 `protobuf:"varint,8,opt,name=attempt,proto3" json:"attempt,omitempty"`
	// contains filtered or unexported fields
}

Step tells an action about the step it runs for, for it to use as it sees fit, such as to say where a request comes from.

func (*Step) Descriptor deprecated

func (*Step) Descriptor() ([]byte, []int)

Deprecated: Use Step.ProtoReflect.Descriptor instead.

func (*Step) GetAttempt

func (x *Step) GetAttempt() int64

func (*Step) GetId

func (x *Step) GetId() string

func (*Step) GetIndex

func (x *Step) GetIndex() int64

func (*Step) GetJobId

func (x *Step) GetJobId() string

func (*Step) GetJobName

func (x *Step) GetJobName() string

func (*Step) GetName

func (x *Step) GetName() string

func (*Step) GetRepeat

func (x *Step) GetRepeat() int64

func (*Step) GetRunId

func (x *Step) GetRunId() string

func (*Step) ProtoMessage

func (*Step) ProtoMessage()

func (*Step) ProtoReflect

func (x *Step) ProtoReflect() protoreflect.Message

func (*Step) Reset

func (x *Step) Reset()

func (*Step) String

func (x *Step) String() string

type UnimplementedActionsServer

type UnimplementedActionsServer struct {
}

UnimplementedActionsServer should be embedded to have forward compatible implementations.

func (UnimplementedActionsServer) Cleanup

func (UnimplementedActionsServer) Run

type UnsafeActionsServer

type UnsafeActionsServer interface {
	// contains filtered or unexported methods
}

UnsafeActionsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ActionsServer will result in compilation errors.

type Violation

type Violation struct {

	// Where it is: request or response.
	In string `protobuf:"bytes,1,opt,name=in,proto3" json:"in,omitempty"`
	// The field, such as $.id; empty when it is not in one.
	Field string `protobuf:"bytes,2,opt,name=field,proto3" json:"field,omitempty"`
	// The kind of violation; empty when there is no kind to tell.
	Reason  string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
	Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

Violation is what a contract does not allow in a request or a response.

func (*Violation) Descriptor deprecated

func (*Violation) Descriptor() ([]byte, []int)

Deprecated: Use Violation.ProtoReflect.Descriptor instead.

func (*Violation) GetField

func (x *Violation) GetField() string

func (*Violation) GetIn

func (x *Violation) GetIn() string

func (*Violation) GetMessage

func (x *Violation) GetMessage() string

func (*Violation) GetReason

func (x *Violation) GetReason() string

func (*Violation) ProtoMessage

func (*Violation) ProtoMessage()

func (*Violation) ProtoReflect

func (x *Violation) ProtoReflect() protoreflect.Message

func (*Violation) Reset

func (x *Violation) Reset()

func (*Violation) String

func (x *Violation) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL