proto

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Syncer_Init_FullMethodName      = "/roady.plugin.v1.Syncer/Init"
	Syncer_Sync_FullMethodName      = "/roady.plugin.v1.Syncer/Sync"
	Syncer_Push_FullMethodName      = "/roady.plugin.v1.Syncer/Push"
	Syncer_Subscribe_FullMethodName = "/roady.plugin.v1.Syncer/Subscribe"
)

Variables

View Source
var File_pkg_domain_plugin_proto_syncer_proto protoreflect.FileDescriptor
View Source
var Syncer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "roady.plugin.v1.Syncer",
	HandlerType: (*SyncerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Init",
			Handler:    _Syncer_Init_Handler,
		},
		{
			MethodName: "Sync",
			Handler:    _Syncer_Sync_Handler,
		},
		{
			MethodName: "Push",
			Handler:    _Syncer_Push_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _Syncer_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "pkg/domain/plugin/proto/syncer.proto",
}

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

Functions

func RegisterSyncerServer

func RegisterSyncerServer(s grpc.ServiceRegistrar, srv SyncerServer)

Types

type Event

type Event struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Type      string                 `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	TaskId    string                 `protobuf:"bytes,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	Status    string                 `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
	Provider  string                 `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Metadata  map[string]string      `` /* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

Event represents an event from the external system.

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetId

func (x *Event) GetId() string

func (*Event) GetMetadata

func (x *Event) GetMetadata() map[string]string

func (*Event) GetProvider

func (x *Event) GetProvider() string

func (*Event) GetStatus

func (x *Event) GetStatus() string

func (*Event) GetTaskId

func (x *Event) GetTaskId() string

func (*Event) GetTimestamp

func (x *Event) GetTimestamp() *timestamppb.Timestamp

func (*Event) GetType

func (x *Event) GetType() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type ExecutionState

type ExecutionState struct {
	TaskStates map[string]*TaskResult `` /* 165-byte string literal not displayed */
	// contains filtered or unexported fields
}

ExecutionState represents the execution state of tasks.

func (*ExecutionState) Descriptor deprecated

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

Deprecated: Use ExecutionState.ProtoReflect.Descriptor instead.

func (*ExecutionState) GetTaskStates

func (x *ExecutionState) GetTaskStates() map[string]*TaskResult

func (*ExecutionState) ProtoMessage

func (*ExecutionState) ProtoMessage()

func (*ExecutionState) ProtoReflect

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

func (*ExecutionState) Reset

func (x *ExecutionState) Reset()

func (*ExecutionState) String

func (x *ExecutionState) String() string

type ExternalRef

type ExternalRef struct {
	Id           string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Identifier   string                 `protobuf:"bytes,2,opt,name=identifier,proto3" json:"identifier,omitempty"`
	Url          string                 `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	LastSyncedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_synced_at,json=lastSyncedAt,proto3" json:"last_synced_at,omitempty"`
	// contains filtered or unexported fields
}

ExternalRef represents a reference to an external system.

func (*ExternalRef) Descriptor deprecated

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

Deprecated: Use ExternalRef.ProtoReflect.Descriptor instead.

func (*ExternalRef) GetId

func (x *ExternalRef) GetId() string

func (*ExternalRef) GetIdentifier

func (x *ExternalRef) GetIdentifier() string

func (*ExternalRef) GetLastSyncedAt

func (x *ExternalRef) GetLastSyncedAt() *timestamppb.Timestamp

func (*ExternalRef) GetUrl

func (x *ExternalRef) GetUrl() string

func (*ExternalRef) ProtoMessage

func (*ExternalRef) ProtoMessage()

func (*ExternalRef) ProtoReflect

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

func (*ExternalRef) Reset

func (x *ExternalRef) Reset()

func (*ExternalRef) String

func (x *ExternalRef) String() string

type InitRequest

type InitRequest struct {
	Config map[string]string `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

InitRequest contains configuration for the syncer.

func (*InitRequest) Descriptor deprecated

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

Deprecated: Use InitRequest.ProtoReflect.Descriptor instead.

func (*InitRequest) GetConfig

func (x *InitRequest) GetConfig() map[string]string

func (*InitRequest) ProtoMessage

func (*InitRequest) ProtoMessage()

func (*InitRequest) ProtoReflect

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

func (*InitRequest) Reset

func (x *InitRequest) Reset()

func (*InitRequest) String

func (x *InitRequest) String() string

type InitResponse

type InitResponse struct {
	Success bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Error   string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

InitResponse indicates initialization success.

func (*InitResponse) Descriptor deprecated

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

Deprecated: Use InitResponse.ProtoReflect.Descriptor instead.

func (*InitResponse) GetError

func (x *InitResponse) GetError() string

func (*InitResponse) GetSuccess

func (x *InitResponse) GetSuccess() bool

func (*InitResponse) ProtoMessage

func (*InitResponse) ProtoMessage()

func (*InitResponse) ProtoReflect

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

func (*InitResponse) Reset

func (x *InitResponse) Reset()

func (*InitResponse) String

func (x *InitResponse) String() string

type Plan

type Plan struct {
	Id             string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	SpecId         string                 `protobuf:"bytes,2,opt,name=spec_id,json=specId,proto3" json:"spec_id,omitempty"`
	Tasks          []*Task                `protobuf:"bytes,3,rep,name=tasks,proto3" json:"tasks,omitempty"`
	ApprovalStatus string                 `protobuf:"bytes,4,opt,name=approval_status,json=approvalStatus,proto3" json:"approval_status,omitempty"`
	CreatedAt      *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt      *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Plan represents a Roady plan.

func (*Plan) Descriptor deprecated

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

Deprecated: Use Plan.ProtoReflect.Descriptor instead.

func (*Plan) GetApprovalStatus

func (x *Plan) GetApprovalStatus() string

func (*Plan) GetCreatedAt

func (x *Plan) GetCreatedAt() *timestamppb.Timestamp

func (*Plan) GetId

func (x *Plan) GetId() string

func (*Plan) GetSpecId

func (x *Plan) GetSpecId() string

func (*Plan) GetTasks

func (x *Plan) GetTasks() []*Task

func (*Plan) GetUpdatedAt

func (x *Plan) GetUpdatedAt() *timestamppb.Timestamp

func (*Plan) ProtoMessage

func (*Plan) ProtoMessage()

func (*Plan) ProtoReflect

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

func (*Plan) Reset

func (x *Plan) Reset()

func (*Plan) String

func (x *Plan) String() string

type PushRequest

type PushRequest struct {
	TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

PushRequest contains a task status change to push.

func (*PushRequest) Descriptor deprecated

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

Deprecated: Use PushRequest.ProtoReflect.Descriptor instead.

func (*PushRequest) GetStatus

func (x *PushRequest) GetStatus() string

func (*PushRequest) GetTaskId

func (x *PushRequest) GetTaskId() string

func (*PushRequest) ProtoMessage

func (*PushRequest) ProtoMessage()

func (*PushRequest) ProtoReflect

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

func (*PushRequest) Reset

func (x *PushRequest) Reset()

func (*PushRequest) String

func (x *PushRequest) String() string

type PushResponse

type PushResponse struct {
	Success bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Error   string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

PushResponse indicates push success.

func (*PushResponse) Descriptor deprecated

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

Deprecated: Use PushResponse.ProtoReflect.Descriptor instead.

func (*PushResponse) GetError

func (x *PushResponse) GetError() string

func (*PushResponse) GetSuccess

func (x *PushResponse) GetSuccess() bool

func (*PushResponse) ProtoMessage

func (*PushResponse) ProtoMessage()

func (*PushResponse) ProtoReflect

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

func (*PushResponse) Reset

func (x *PushResponse) Reset()

func (*PushResponse) String

func (x *PushResponse) String() string

type SubscribeRequest

type SubscribeRequest struct {
	EventTypes []string `protobuf:"bytes,1,rep,name=event_types,json=eventTypes,proto3" json:"event_types,omitempty"`
	// contains filtered or unexported fields
}

SubscribeRequest contains subscription parameters.

func (*SubscribeRequest) Descriptor deprecated

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

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) GetEventTypes

func (x *SubscribeRequest) GetEventTypes() []string

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

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

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type SyncRequest

type SyncRequest struct {
	Plan  *Plan           `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"`
	State *ExecutionState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

SyncRequest contains the plan and state to sync.

func (*SyncRequest) Descriptor deprecated

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

Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.

func (*SyncRequest) GetPlan

func (x *SyncRequest) GetPlan() *Plan

func (*SyncRequest) GetState

func (x *SyncRequest) GetState() *ExecutionState

func (*SyncRequest) ProtoMessage

func (*SyncRequest) ProtoMessage()

func (*SyncRequest) ProtoReflect

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

func (*SyncRequest) Reset

func (x *SyncRequest) Reset()

func (*SyncRequest) String

func (x *SyncRequest) String() string

type SyncResponse

type SyncResponse struct {
	StatusUpdates map[string]string       `` /* 174-byte string literal not displayed */
	LinkUpdates   map[string]*ExternalRef `` /* 168-byte string literal not displayed */
	Errors        []string                `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"`
	// contains filtered or unexported fields
}

SyncResponse contains the sync result.

func (*SyncResponse) Descriptor deprecated

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

Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead.

func (*SyncResponse) GetErrors

func (x *SyncResponse) GetErrors() []string

func (*SyncResponse) GetLinkUpdates

func (x *SyncResponse) GetLinkUpdates() map[string]*ExternalRef

func (*SyncResponse) GetStatusUpdates

func (x *SyncResponse) GetStatusUpdates() map[string]string

func (*SyncResponse) ProtoMessage

func (*SyncResponse) ProtoMessage()

func (*SyncResponse) ProtoReflect

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

func (*SyncResponse) Reset

func (x *SyncResponse) Reset()

func (*SyncResponse) String

func (x *SyncResponse) String() string

type SyncerClient

type SyncerClient interface {
	// Init initializes the syncer with configuration.
	Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*InitResponse, error)
	// Sync performs a sync operation between Roady plan and external system.
	Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error)
	// Push pushes a status change to the external system.
	Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error)
	// Subscribe returns a stream of events from the external system (for webhooks).
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Event], error)
}

SyncerClient is the client API for Syncer 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.

Syncer service provides bidirectional sync between Roady and external systems.

func NewSyncerClient

func NewSyncerClient(cc grpc.ClientConnInterface) SyncerClient

type SyncerServer

type SyncerServer interface {
	// Init initializes the syncer with configuration.
	Init(context.Context, *InitRequest) (*InitResponse, error)
	// Sync performs a sync operation between Roady plan and external system.
	Sync(context.Context, *SyncRequest) (*SyncResponse, error)
	// Push pushes a status change to the external system.
	Push(context.Context, *PushRequest) (*PushResponse, error)
	// Subscribe returns a stream of events from the external system (for webhooks).
	Subscribe(*SubscribeRequest, grpc.ServerStreamingServer[Event]) error
	// contains filtered or unexported methods
}

SyncerServer is the server API for Syncer service. All implementations must embed UnimplementedSyncerServer for forward compatibility.

Syncer service provides bidirectional sync between Roady and external systems.

type Syncer_SubscribeClient

type Syncer_SubscribeClient = grpc.ServerStreamingClient[Event]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Syncer_SubscribeServer

type Syncer_SubscribeServer = grpc.ServerStreamingServer[Event]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Task

type Task struct {
	Id           string                  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Title        string                  `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Description  string                  `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Phase        string                  `protobuf:"bytes,4,opt,name=phase,proto3" json:"phase,omitempty"`
	Outcome      string                  `protobuf:"bytes,5,opt,name=outcome,proto3" json:"outcome,omitempty"`
	Dependencies []string                `protobuf:"bytes,6,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
	ExternalRefs map[string]*ExternalRef `` /* 171-byte string literal not displayed */
	// contains filtered or unexported fields
}

Task represents a task in a plan.

func (*Task) Descriptor deprecated

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

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetDependencies

func (x *Task) GetDependencies() []string

func (*Task) GetDescription

func (x *Task) GetDescription() string

func (*Task) GetExternalRefs

func (x *Task) GetExternalRefs() map[string]*ExternalRef

func (*Task) GetId

func (x *Task) GetId() string

func (*Task) GetOutcome

func (x *Task) GetOutcome() string

func (*Task) GetPhase

func (x *Task) GetPhase() string

func (*Task) GetTitle

func (x *Task) GetTitle() string

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

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

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

type TaskResult

type TaskResult struct {
	Status       string                  `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Owner        string                  `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	StartedAt    *timestamppb.Timestamp  `protobuf:"bytes,3,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
	CompletedAt  *timestamppb.Timestamp  `protobuf:"bytes,4,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"`
	ExternalRefs map[string]*ExternalRef `` /* 171-byte string literal not displayed */
	// contains filtered or unexported fields
}

TaskResult represents the result/state of a task.

func (*TaskResult) Descriptor deprecated

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

Deprecated: Use TaskResult.ProtoReflect.Descriptor instead.

func (*TaskResult) GetCompletedAt

func (x *TaskResult) GetCompletedAt() *timestamppb.Timestamp

func (*TaskResult) GetExternalRefs

func (x *TaskResult) GetExternalRefs() map[string]*ExternalRef

func (*TaskResult) GetOwner

func (x *TaskResult) GetOwner() string

func (*TaskResult) GetStartedAt

func (x *TaskResult) GetStartedAt() *timestamppb.Timestamp

func (*TaskResult) GetStatus

func (x *TaskResult) GetStatus() string

func (*TaskResult) ProtoMessage

func (*TaskResult) ProtoMessage()

func (*TaskResult) ProtoReflect

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

func (*TaskResult) Reset

func (x *TaskResult) Reset()

func (*TaskResult) String

func (x *TaskResult) String() string

type UnimplementedSyncerServer

type UnimplementedSyncerServer struct{}

UnimplementedSyncerServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedSyncerServer) Init

func (UnimplementedSyncerServer) Push

func (UnimplementedSyncerServer) Subscribe

func (UnimplementedSyncerServer) Sync

type UnsafeSyncerServer

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

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

Jump to

Keyboard shortcuts

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