Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterClockwerkHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterClockwerkHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClockwerkClient) error
- func RegisterClockwerkHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterClockwerkHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClockwerkServer) error
- func RegisterClockwerkServer(s grpc.ServiceRegistrar, srv ClockwerkServer)
- type ClockwerkClient
- type ClockwerkServer
- type Scheduler
- func (*Scheduler) Descriptor() ([]byte, []int)deprecated
- func (x *Scheduler) GetBody() string
- func (x *Scheduler) GetCommand() string
- func (x *Scheduler) GetCreatedAt() int64
- func (x *Scheduler) GetDisabled() bool
- func (x *Scheduler) GetEntryId() int32
- func (x *Scheduler) GetExecutor() string
- func (x *Scheduler) GetHeaders() []string
- func (x *Scheduler) GetId() string
- func (x *Scheduler) GetMethod() string
- func (x *Scheduler) GetName() string
- func (x *Scheduler) GetPassword() string
- func (x *Scheduler) GetPersist() bool
- func (x *Scheduler) GetReferenceId() string
- func (x *Scheduler) GetRetry() int32
- func (x *Scheduler) GetRetryThreshold() int32
- func (x *Scheduler) GetSpec() string
- func (x *Scheduler) GetUrl() string
- func (x *Scheduler) GetUsername() string
- func (*Scheduler) ProtoMessage()
- func (x *Scheduler) ProtoReflect() protoreflect.Message
- func (x *Scheduler) Reset()
- func (x *Scheduler) String() string
- type Schedulers
- type SelectScheduler
- func (*SelectScheduler) Descriptor() ([]byte, []int)deprecated
- func (x *SelectScheduler) GetId() string
- func (x *SelectScheduler) GetPassword() string
- func (x *SelectScheduler) GetReferenceId() string
- func (x *SelectScheduler) GetUsername() string
- func (*SelectScheduler) ProtoMessage()
- func (x *SelectScheduler) ProtoReflect() protoreflect.Message
- func (x *SelectScheduler) Reset()
- func (x *SelectScheduler) String() string
- type SelectToggle
- func (*SelectToggle) Descriptor() ([]byte, []int)deprecated
- func (x *SelectToggle) GetDisabled() bool
- func (x *SelectToggle) GetId() string
- func (x *SelectToggle) GetPassword() string
- func (x *SelectToggle) GetReferenceId() string
- func (x *SelectToggle) GetUsername() string
- func (*SelectToggle) ProtoMessage()
- func (x *SelectToggle) ProtoReflect() protoreflect.Message
- func (x *SelectToggle) Reset()
- func (x *SelectToggle) String() string
- type UnimplementedClockwerkServer
- func (UnimplementedClockwerkServer) AddScheduler(context.Context, *Scheduler) (*Scheduler, error)
- func (UnimplementedClockwerkServer) Backup(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedClockwerkServer) DeleteDummy(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedClockwerkServer) DeleteScheduler(context.Context, *SelectScheduler) (*emptypb.Empty, error)
- func (UnimplementedClockwerkServer) GetDummy(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedClockwerkServer) GetSchedulers(context.Context, *emptypb.Empty) (*Schedulers, error)
- func (UnimplementedClockwerkServer) PostDummy(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedClockwerkServer) PutDummy(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedClockwerkServer) ToggleScheduler(context.Context, *SelectToggle) (*emptypb.Empty, error)
- type UnsafeClockwerkServer
Constants ¶
This section is empty.
Variables ¶
var Clockwerk_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.Clockwerk", HandlerType: (*ClockwerkServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetDummy", Handler: _Clockwerk_GetDummy_Handler, }, { MethodName: "PostDummy", Handler: _Clockwerk_PostDummy_Handler, }, { MethodName: "DeleteDummy", Handler: _Clockwerk_DeleteDummy_Handler, }, { MethodName: "PutDummy", Handler: _Clockwerk_PutDummy_Handler, }, { MethodName: "GetSchedulers", Handler: _Clockwerk_GetSchedulers_Handler, }, { MethodName: "AddScheduler", Handler: _Clockwerk_AddScheduler_Handler, }, { MethodName: "DeleteScheduler", Handler: _Clockwerk_DeleteScheduler_Handler, }, { MethodName: "ToggleScheduler", Handler: _Clockwerk_ToggleScheduler_Handler, }, { MethodName: "Backup", Handler: _Clockwerk_Backup_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "clockwerk.proto", }
Clockwerk_ServiceDesc is the grpc.ServiceDesc for Clockwerk service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_clockwerk_proto protoreflect.FileDescriptor
Functions ¶
func RegisterClockwerkHandler ¶
func RegisterClockwerkHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterClockwerkHandler registers the http handlers for service Clockwerk to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterClockwerkHandlerClient ¶
func RegisterClockwerkHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClockwerkClient) error
RegisterClockwerkHandlerClient registers the http handlers for service Clockwerk to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ClockwerkClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ClockwerkClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ClockwerkClient" to call the correct interceptors.
func RegisterClockwerkHandlerFromEndpoint ¶
func RegisterClockwerkHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterClockwerkHandlerFromEndpoint is same as RegisterClockwerkHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterClockwerkHandlerServer ¶
func RegisterClockwerkHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClockwerkServer) error
RegisterClockwerkHandlerServer registers the http handlers for service Clockwerk to "mux". UnaryRPC :call ClockwerkServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterClockwerkHandlerFromEndpoint instead.
func RegisterClockwerkServer ¶
func RegisterClockwerkServer(s grpc.ServiceRegistrar, srv ClockwerkServer)
Types ¶
type ClockwerkClient ¶
type ClockwerkClient interface { GetDummy(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) PostDummy(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteDummy(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) PutDummy(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) GetSchedulers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Schedulers, error) AddScheduler(ctx context.Context, in *Scheduler, opts ...grpc.CallOption) (*Scheduler, error) DeleteScheduler(ctx context.Context, in *SelectScheduler, opts ...grpc.CallOption) (*emptypb.Empty, error) ToggleScheduler(ctx context.Context, in *SelectToggle, opts ...grpc.CallOption) (*emptypb.Empty, error) Backup(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) }
ClockwerkClient is the client API for Clockwerk 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 NewClockwerkClient ¶
func NewClockwerkClient(cc grpc.ClientConnInterface) ClockwerkClient
type ClockwerkServer ¶
type ClockwerkServer interface { GetDummy(context.Context, *emptypb.Empty) (*emptypb.Empty, error) PostDummy(context.Context, *emptypb.Empty) (*emptypb.Empty, error) DeleteDummy(context.Context, *emptypb.Empty) (*emptypb.Empty, error) PutDummy(context.Context, *emptypb.Empty) (*emptypb.Empty, error) GetSchedulers(context.Context, *emptypb.Empty) (*Schedulers, error) AddScheduler(context.Context, *Scheduler) (*Scheduler, error) DeleteScheduler(context.Context, *SelectScheduler) (*emptypb.Empty, error) ToggleScheduler(context.Context, *SelectToggle) (*emptypb.Empty, error) Backup(context.Context, *emptypb.Empty) (*emptypb.Empty, error) }
ClockwerkServer is the server API for Clockwerk service. All implementations should embed UnimplementedClockwerkServer for forward compatibility
type Scheduler ¶
type Scheduler struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` EntryId int32 `protobuf:"varint,2,opt,name=entry_id,json=entryId,proto3" json:"entry_id,omitempty"` ReferenceId string `protobuf:"bytes,3,opt,name=reference_id,json=referenceId,proto3" json:"reference_id,omitempty"` Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` Executor string `protobuf:"bytes,5,opt,name=executor,proto3" json:"executor,omitempty"` Command string `protobuf:"bytes,6,opt,name=command,proto3" json:"command,omitempty"` Url string `protobuf:"bytes,7,opt,name=url,proto3" json:"url,omitempty"` Method string `protobuf:"bytes,8,opt,name=method,proto3" json:"method,omitempty"` Body string `protobuf:"bytes,9,opt,name=body,proto3" json:"body,omitempty"` Retry int32 `protobuf:"varint,10,opt,name=retry,proto3" json:"retry,omitempty"` RetryThreshold int32 `protobuf:"varint,11,opt,name=retry_threshold,json=retryThreshold,proto3" json:"retry_threshold,omitempty"` Headers []string `protobuf:"bytes,12,rep,name=headers,proto3" json:"headers,omitempty"` Spec string `protobuf:"bytes,13,opt,name=spec,proto3" json:"spec,omitempty"` Disabled bool `protobuf:"varint,14,opt,name=disabled,proto3" json:"disabled,omitempty"` Persist bool `protobuf:"varint,15,opt,name=persist,proto3" json:"persist,omitempty"` CreatedAt int64 `protobuf:"varint,16,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` Username string `protobuf:"bytes,17,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,18,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*Scheduler) Descriptor
deprecated
func (*Scheduler) GetCommand ¶
func (*Scheduler) GetCreatedAt ¶
func (*Scheduler) GetDisabled ¶
func (*Scheduler) GetEntryId ¶
func (*Scheduler) GetExecutor ¶
func (*Scheduler) GetHeaders ¶
func (*Scheduler) GetPassword ¶
func (*Scheduler) GetPersist ¶
func (*Scheduler) GetReferenceId ¶
func (*Scheduler) GetRetryThreshold ¶
func (*Scheduler) GetUsername ¶
func (*Scheduler) ProtoMessage ¶
func (*Scheduler) ProtoMessage()
func (*Scheduler) ProtoReflect ¶
func (x *Scheduler) ProtoReflect() protoreflect.Message
type Schedulers ¶
type Schedulers struct { Schedulers []*Scheduler `protobuf:"bytes,1,rep,name=schedulers,proto3" json:"schedulers,omitempty"` // contains filtered or unexported fields }
func (*Schedulers) Descriptor
deprecated
func (*Schedulers) Descriptor() ([]byte, []int)
Deprecated: Use Schedulers.ProtoReflect.Descriptor instead.
func (*Schedulers) GetSchedulers ¶
func (x *Schedulers) GetSchedulers() []*Scheduler
func (*Schedulers) ProtoMessage ¶
func (*Schedulers) ProtoMessage()
func (*Schedulers) ProtoReflect ¶
func (x *Schedulers) ProtoReflect() protoreflect.Message
func (*Schedulers) Reset ¶
func (x *Schedulers) Reset()
func (*Schedulers) String ¶
func (x *Schedulers) String() string
type SelectScheduler ¶
type SelectScheduler struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ReferenceId string `protobuf:"bytes,2,opt,name=reference_id,json=referenceId,proto3" json:"reference_id,omitempty"` Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*SelectScheduler) Descriptor
deprecated
func (*SelectScheduler) Descriptor() ([]byte, []int)
Deprecated: Use SelectScheduler.ProtoReflect.Descriptor instead.
func (*SelectScheduler) GetId ¶
func (x *SelectScheduler) GetId() string
func (*SelectScheduler) GetPassword ¶
func (x *SelectScheduler) GetPassword() string
func (*SelectScheduler) GetReferenceId ¶
func (x *SelectScheduler) GetReferenceId() string
func (*SelectScheduler) GetUsername ¶
func (x *SelectScheduler) GetUsername() string
func (*SelectScheduler) ProtoMessage ¶
func (*SelectScheduler) ProtoMessage()
func (*SelectScheduler) ProtoReflect ¶
func (x *SelectScheduler) ProtoReflect() protoreflect.Message
func (*SelectScheduler) Reset ¶
func (x *SelectScheduler) Reset()
func (*SelectScheduler) String ¶
func (x *SelectScheduler) String() string
type SelectToggle ¶
type SelectToggle struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ReferenceId string `protobuf:"bytes,2,opt,name=reference_id,json=referenceId,proto3" json:"reference_id,omitempty"` Disabled bool `protobuf:"varint,3,opt,name=disabled,proto3" json:"disabled,omitempty"` Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*SelectToggle) Descriptor
deprecated
func (*SelectToggle) Descriptor() ([]byte, []int)
Deprecated: Use SelectToggle.ProtoReflect.Descriptor instead.
func (*SelectToggle) GetDisabled ¶
func (x *SelectToggle) GetDisabled() bool
func (*SelectToggle) GetId ¶
func (x *SelectToggle) GetId() string
func (*SelectToggle) GetPassword ¶
func (x *SelectToggle) GetPassword() string
func (*SelectToggle) GetReferenceId ¶
func (x *SelectToggle) GetReferenceId() string
func (*SelectToggle) GetUsername ¶
func (x *SelectToggle) GetUsername() string
func (*SelectToggle) ProtoMessage ¶
func (*SelectToggle) ProtoMessage()
func (*SelectToggle) ProtoReflect ¶
func (x *SelectToggle) ProtoReflect() protoreflect.Message
func (*SelectToggle) Reset ¶
func (x *SelectToggle) Reset()
func (*SelectToggle) String ¶
func (x *SelectToggle) String() string
type UnimplementedClockwerkServer ¶
type UnimplementedClockwerkServer struct { }
UnimplementedClockwerkServer should be embedded to have forward compatible implementations.
func (UnimplementedClockwerkServer) AddScheduler ¶
func (UnimplementedClockwerkServer) DeleteDummy ¶
func (UnimplementedClockwerkServer) DeleteScheduler ¶
func (UnimplementedClockwerkServer) DeleteScheduler(context.Context, *SelectScheduler) (*emptypb.Empty, error)
func (UnimplementedClockwerkServer) GetSchedulers ¶
func (UnimplementedClockwerkServer) GetSchedulers(context.Context, *emptypb.Empty) (*Schedulers, error)
func (UnimplementedClockwerkServer) ToggleScheduler ¶
func (UnimplementedClockwerkServer) ToggleScheduler(context.Context, *SelectToggle) (*emptypb.Empty, error)
type UnsafeClockwerkServer ¶
type UnsafeClockwerkServer interface {
// contains filtered or unexported methods
}
UnsafeClockwerkServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ClockwerkServer will result in compilation errors.