template

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package template is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_template_template_proto protoreflect.FileDescriptor

Functions

func RegisterTemplateServiceHandler added in v0.2.0

func RegisterTemplateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterTemplateServiceHandler registers the http handlers for service TemplateService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterTemplateServiceHandlerClient added in v0.2.0

func RegisterTemplateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TemplateServiceClient) error

RegisterTemplateServiceHandlerClient registers the http handlers for service TemplateService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TemplateServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TemplateServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TemplateServiceClient" to call the correct interceptors.

func RegisterTemplateServiceHandlerFromEndpoint added in v0.2.0

func RegisterTemplateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterTemplateServiceHandlerFromEndpoint is same as RegisterTemplateServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterTemplateServiceHandlerServer added in v0.2.0

func RegisterTemplateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TemplateServiceServer) error

RegisterTemplateServiceHandlerServer registers the http handlers for service TemplateService to "mux". UnaryRPC :call TemplateServiceServer 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 RegisterTemplateServiceHandlerFromEndpoint instead.

func RegisterTemplateServiceServer added in v0.2.0

func RegisterTemplateServiceServer(s *grpc.Server, srv TemplateServiceServer)

Types

type CreateResponse

type CreateResponse struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetId

func (x *CreateResponse) GetId() string

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect added in v0.2.0

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

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect added in v0.2.0

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GetRequest

type GetRequest struct {

	// Types that are assignable to GetBy:
	//	*GetRequest_Id
	//	*GetRequest_Name
	GetBy isGetRequest_GetBy `protobuf_oneof:"get_by"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetGetBy added in v0.2.0

func (m *GetRequest) GetGetBy() isGetRequest_GetBy

func (*GetRequest) GetId

func (x *GetRequest) GetId() string

func (*GetRequest) GetName added in v0.2.0

func (x *GetRequest) GetName() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect added in v0.2.0

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetRequest_Id added in v0.2.0

type GetRequest_Id struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"`
}

type GetRequest_Name added in v0.2.0

type GetRequest_Name struct {
	Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"`
}

type ListRequest added in v0.2.0

type ListRequest struct {

	// Types that are assignable to FilterBy:
	//	*ListRequest_Name
	FilterBy isListRequest_FilterBy `protobuf_oneof:"filter_by"`
	// contains filtered or unexported fields
}

func (*ListRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetFilterBy added in v0.2.0

func (m *ListRequest) GetFilterBy() isListRequest_FilterBy

func (*ListRequest) GetName added in v0.2.0

func (x *ListRequest) GetName() string

func (*ListRequest) ProtoMessage added in v0.2.0

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect added in v0.2.0

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

func (*ListRequest) Reset added in v0.2.0

func (x *ListRequest) Reset()

func (*ListRequest) String added in v0.2.0

func (x *ListRequest) String() string

type ListRequest_Name added in v0.2.0

type ListRequest_Name struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3,oneof"`
}

type TemplateServiceClient added in v0.2.0

type TemplateServiceClient interface {
	CreateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*CreateResponse, error)
	GetTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
	DeleteTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error)
	ListTemplates(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (TemplateService_ListTemplatesClient, error)
	UpdateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*Empty, error)
}

TemplateServiceClient is the client API for TemplateService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewTemplateServiceClient added in v0.2.0

func NewTemplateServiceClient(cc grpc.ClientConnInterface) TemplateServiceClient

type TemplateServiceServer added in v0.2.0

type TemplateServiceServer interface {
	CreateTemplate(context.Context, *WorkflowTemplate) (*CreateResponse, error)
	GetTemplate(context.Context, *GetRequest) (*WorkflowTemplate, error)
	DeleteTemplate(context.Context, *GetRequest) (*Empty, error)
	ListTemplates(*ListRequest, TemplateService_ListTemplatesServer) error
	UpdateTemplate(context.Context, *WorkflowTemplate) (*Empty, error)
}

TemplateServiceServer is the server API for TemplateService service.

type TemplateService_ListTemplatesClient added in v0.2.0

type TemplateService_ListTemplatesClient interface {
	Recv() (*WorkflowTemplate, error)
	grpc.ClientStream
}

type TemplateService_ListTemplatesServer added in v0.2.0

type TemplateService_ListTemplatesServer interface {
	Send(*WorkflowTemplate) error
	grpc.ServerStream
}

type UnimplementedTemplateServiceServer added in v0.2.0

type UnimplementedTemplateServiceServer struct {
}

UnimplementedTemplateServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedTemplateServiceServer) CreateTemplate added in v0.2.0

func (*UnimplementedTemplateServiceServer) DeleteTemplate added in v0.2.0

func (*UnimplementedTemplateServiceServer) GetTemplate added in v0.2.0

func (*UnimplementedTemplateServiceServer) ListTemplates added in v0.2.0

func (*UnimplementedTemplateServiceServer) UpdateTemplate added in v0.2.0

type WorkflowTemplate

type WorkflowTemplate struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name      string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	DeletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`
	Data      string                 `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*WorkflowTemplate) Descriptor deprecated

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

Deprecated: Use WorkflowTemplate.ProtoReflect.Descriptor instead.

func (*WorkflowTemplate) GetCreatedAt

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

func (*WorkflowTemplate) GetData

func (x *WorkflowTemplate) GetData() string

func (*WorkflowTemplate) GetDeletedAt

func (x *WorkflowTemplate) GetDeletedAt() *timestamppb.Timestamp

func (*WorkflowTemplate) GetId

func (x *WorkflowTemplate) GetId() string

func (*WorkflowTemplate) GetName

func (x *WorkflowTemplate) GetName() string

func (*WorkflowTemplate) GetUpdatedAt

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

func (*WorkflowTemplate) ProtoMessage

func (*WorkflowTemplate) ProtoMessage()

func (*WorkflowTemplate) ProtoReflect added in v0.2.0

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

func (*WorkflowTemplate) Reset

func (x *WorkflowTemplate) Reset()

func (*WorkflowTemplate) String

func (x *WorkflowTemplate) String() string

Jump to

Keyboard shortcuts

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