v1

package
v0.0.0-...-a2f80f4 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Scheduler.ProtoReflect.Descriptor instead.

func (*Scheduler) GetBody

func (x *Scheduler) GetBody() string

func (*Scheduler) GetCommand

func (x *Scheduler) GetCommand() string

func (*Scheduler) GetCreatedAt

func (x *Scheduler) GetCreatedAt() int64

func (*Scheduler) GetDisabled

func (x *Scheduler) GetDisabled() bool

func (*Scheduler) GetEntryId

func (x *Scheduler) GetEntryId() int32

func (*Scheduler) GetExecutor

func (x *Scheduler) GetExecutor() string

func (*Scheduler) GetHeaders

func (x *Scheduler) GetHeaders() []string

func (*Scheduler) GetId

func (x *Scheduler) GetId() string

func (*Scheduler) GetMethod

func (x *Scheduler) GetMethod() string

func (*Scheduler) GetName

func (x *Scheduler) GetName() string

func (*Scheduler) GetPassword

func (x *Scheduler) GetPassword() string

func (*Scheduler) GetPersist

func (x *Scheduler) GetPersist() bool

func (*Scheduler) GetReferenceId

func (x *Scheduler) GetReferenceId() string

func (*Scheduler) GetRetry

func (x *Scheduler) GetRetry() int32

func (*Scheduler) GetRetryThreshold

func (x *Scheduler) GetRetryThreshold() int32

func (*Scheduler) GetSpec

func (x *Scheduler) GetSpec() string

func (*Scheduler) GetUrl

func (x *Scheduler) GetUrl() string

func (*Scheduler) GetUsername

func (x *Scheduler) GetUsername() string

func (*Scheduler) ProtoMessage

func (*Scheduler) ProtoMessage()

func (*Scheduler) ProtoReflect

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

func (*Scheduler) Reset

func (x *Scheduler) Reset()

func (*Scheduler) String

func (x *Scheduler) String() string

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

func (UnimplementedClockwerkServer) DeleteDummy

func (UnimplementedClockwerkServer) DeleteScheduler

func (UnimplementedClockwerkServer) GetDummy

func (UnimplementedClockwerkServer) GetSchedulers

func (UnimplementedClockwerkServer) PostDummy

func (UnimplementedClockwerkServer) PutDummy

func (UnimplementedClockwerkServer) ToggleScheduler

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.

Jump to

Keyboard shortcuts

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