pb

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var Actions_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.Actions",
	HandlerType: (*ActionsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Run",
			Handler:    _Actions_Run_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "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_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)
}

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)
}

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

type Guard added in v1.20.0

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 added in v1.20.0

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

Deprecated: Use Guard.ProtoReflect.Descriptor instead.

func (*Guard) GetAllowActions added in v1.20.0

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

func (*Guard) GetAllowHosts added in v1.20.0

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

func (*Guard) GetKeeps added in v1.21.0

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

func (*Guard) GetReadOnly added in v1.20.0

func (x *Guard) GetReadOnly() bool

func (*Guard) ProtoMessage added in v1.20.0

func (*Guard) ProtoMessage()

func (*Guard) ProtoReflect added in v1.20.0

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

func (*Guard) Reset added in v1.20.0

func (x *Guard) Reset()

func (*Guard) String added in v1.20.0

func (x *Guard) String() string

type GuardKinds added in v1.21.0

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 added in v1.21.0

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

Deprecated: Use GuardKinds.ProtoReflect.Descriptor instead.

func (*GuardKinds) GetKinds added in v1.21.0

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

func (*GuardKinds) ProtoMessage added in v1.21.0

func (*GuardKinds) ProtoMessage()

func (*GuardKinds) ProtoReflect added in v1.21.0

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

func (*GuardKinds) Reset added in v1.21.0

func (x *GuardKinds) Reset()

func (*GuardKinds) String added in v1.21.0

func (x *GuardKinds) 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"`
	// contains filtered or unexported fields
}

func (*RunRequest) Descriptor deprecated

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

Deprecated: Use RunRequest.ProtoReflect.Descriptor instead.

func (*RunRequest) GetGuard added in v1.20.0

func (x *RunRequest) GetGuard() *Guard

func (*RunRequest) GetState added in v1.19.0

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

func (*RunRequest) GetStep added in v1.19.0

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"`
	// contains filtered or unexported fields
}

func (*RunResponse) Descriptor deprecated

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

Deprecated: Use RunResponse.ProtoReflect.Descriptor instead.

func (*RunResponse) GetResult

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

func (*RunResponse) GetState added in v1.19.0

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 added in v1.19.0

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 empty.
	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 added in v1.19.0

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

Deprecated: Use Step.ProtoReflect.Descriptor instead.

func (*Step) GetAttempt added in v1.19.0

func (x *Step) GetAttempt() int64

func (*Step) GetId added in v1.19.0

func (x *Step) GetId() string

func (*Step) GetIndex added in v1.19.0

func (x *Step) GetIndex() int64

func (*Step) GetJobId added in v1.19.0

func (x *Step) GetJobId() string

func (*Step) GetJobName added in v1.19.0

func (x *Step) GetJobName() string

func (*Step) GetName added in v1.19.0

func (x *Step) GetName() string

func (*Step) GetRepeat added in v1.19.0

func (x *Step) GetRepeat() int64

func (*Step) GetRunId added in v1.19.0

func (x *Step) GetRunId() string

func (*Step) ProtoMessage added in v1.19.0

func (*Step) ProtoMessage()

func (*Step) ProtoReflect added in v1.19.0

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

func (*Step) Reset added in v1.19.0

func (x *Step) Reset()

func (*Step) String added in v1.19.0

func (x *Step) String() string

type UnimplementedActionsServer

type UnimplementedActionsServer struct {
}

UnimplementedActionsServer should be embedded to have forward compatible implementations.

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.

Jump to

Keyboard shortcuts

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