Documentation
¶
Overview ¶
Package template is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterTemplateHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTemplateHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TemplateClient) error
- func RegisterTemplateHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTemplateHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TemplateServer) error
- func RegisterTemplateServer(s *grpc.Server, srv TemplateServer)
- type CreateResponse
- func (*CreateResponse) Descriptor() ([]byte, []int)
- func (m *CreateResponse) GetId() string
- func (*CreateResponse) ProtoMessage()
- func (m *CreateResponse) Reset()
- func (m *CreateResponse) String() string
- func (m *CreateResponse) XXX_DiscardUnknown()
- func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateResponse) XXX_Merge(src proto.Message)
- func (m *CreateResponse) XXX_Size() int
- func (m *CreateResponse) XXX_Unmarshal(b []byte) error
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)
- func (m *GetRequest) GetId() string
- func (*GetRequest) ProtoMessage()
- func (m *GetRequest) Reset()
- func (m *GetRequest) String() string
- func (m *GetRequest) XXX_DiscardUnknown()
- func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetRequest) XXX_Merge(src proto.Message)
- func (m *GetRequest) XXX_Size() int
- func (m *GetRequest) XXX_Unmarshal(b []byte) error
- type TemplateClient
- type TemplateServer
- type Template_ListTemplatesClient
- type Template_ListTemplatesServer
- type UnimplementedTemplateServer
- func (*UnimplementedTemplateServer) CreateTemplate(ctx context.Context, req *WorkflowTemplate) (*CreateResponse, error)
- func (*UnimplementedTemplateServer) DeleteTemplate(ctx context.Context, req *GetRequest) (*Empty, error)
- func (*UnimplementedTemplateServer) GetTemplate(ctx context.Context, req *GetRequest) (*WorkflowTemplate, error)
- func (*UnimplementedTemplateServer) ListTemplates(req *Empty, srv Template_ListTemplatesServer) error
- func (*UnimplementedTemplateServer) UpdateTemplate(ctx context.Context, req *WorkflowTemplate) (*Empty, error)
- type WorkflowTemplate
- func (*WorkflowTemplate) Descriptor() ([]byte, []int)
- func (m *WorkflowTemplate) GetCreatedAt() *timestamp.Timestamp
- func (m *WorkflowTemplate) GetData() string
- func (m *WorkflowTemplate) GetDeletedAt() *timestamp.Timestamp
- func (m *WorkflowTemplate) GetId() string
- func (m *WorkflowTemplate) GetName() string
- func (m *WorkflowTemplate) GetUpdatedAt() *timestamp.Timestamp
- func (*WorkflowTemplate) ProtoMessage()
- func (m *WorkflowTemplate) Reset()
- func (m *WorkflowTemplate) String() string
- func (m *WorkflowTemplate) XXX_DiscardUnknown()
- func (m *WorkflowTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WorkflowTemplate) XXX_Merge(src proto.Message)
- func (m *WorkflowTemplate) XXX_Size() int
- func (m *WorkflowTemplate) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTemplateHandler ¶
func RegisterTemplateHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTemplateHandler registers the http handlers for service Template to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTemplateHandlerClient ¶
func RegisterTemplateHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TemplateClient) error
RegisterTemplateHandlerClient registers the http handlers for service Template to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TemplateClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TemplateClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TemplateClient" to call the correct interceptors.
func RegisterTemplateHandlerFromEndpoint ¶
func RegisterTemplateHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTemplateHandlerFromEndpoint is same as RegisterTemplateHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTemplateHandlerServer ¶
func RegisterTemplateHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TemplateServer) error
RegisterTemplateHandlerServer registers the http handlers for service Template to "mux". UnaryRPC :call TemplateServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterTemplateServer ¶
func RegisterTemplateServer(s *grpc.Server, srv TemplateServer)
Types ¶
type CreateResponse ¶
type CreateResponse struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*CreateResponse) Descriptor ¶
func (*CreateResponse) Descriptor() ([]byte, []int)
func (*CreateResponse) GetId ¶
func (m *CreateResponse) GetId() string
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) Reset ¶
func (m *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (m *CreateResponse) String() string
func (*CreateResponse) XXX_DiscardUnknown ¶
func (m *CreateResponse) XXX_DiscardUnknown()
func (*CreateResponse) XXX_Marshal ¶
func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateResponse) XXX_Merge ¶
func (m *CreateResponse) XXX_Merge(src proto.Message)
func (*CreateResponse) XXX_Size ¶
func (m *CreateResponse) XXX_Size() int
func (*CreateResponse) XXX_Unmarshal ¶
func (m *CreateResponse) XXX_Unmarshal(b []byte) error
type Empty ¶
type Empty struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
type GetRequest ¶
type GetRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) GetId ¶
func (m *GetRequest) GetId() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) String ¶
func (m *GetRequest) String() string
func (*GetRequest) XXX_DiscardUnknown ¶
func (m *GetRequest) XXX_DiscardUnknown()
func (*GetRequest) XXX_Marshal ¶
func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetRequest) XXX_Merge ¶
func (m *GetRequest) XXX_Merge(src proto.Message)
func (*GetRequest) XXX_Size ¶
func (m *GetRequest) XXX_Size() int
func (*GetRequest) XXX_Unmarshal ¶
func (m *GetRequest) XXX_Unmarshal(b []byte) error
type TemplateClient ¶
type TemplateClient 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 *Empty, opts ...grpc.CallOption) (Template_ListTemplatesClient, error)
UpdateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*Empty, error)
}
TemplateClient is the client API for Template service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTemplateClient ¶
func NewTemplateClient(cc grpc.ClientConnInterface) TemplateClient
type TemplateServer ¶
type TemplateServer interface {
CreateTemplate(context.Context, *WorkflowTemplate) (*CreateResponse, error)
GetTemplate(context.Context, *GetRequest) (*WorkflowTemplate, error)
DeleteTemplate(context.Context, *GetRequest) (*Empty, error)
ListTemplates(*Empty, Template_ListTemplatesServer) error
UpdateTemplate(context.Context, *WorkflowTemplate) (*Empty, error)
}
TemplateServer is the server API for Template service.
type Template_ListTemplatesClient ¶
type Template_ListTemplatesClient interface {
Recv() (*WorkflowTemplate, error)
grpc.ClientStream
}
type Template_ListTemplatesServer ¶
type Template_ListTemplatesServer interface {
Send(*WorkflowTemplate) error
grpc.ServerStream
}
type UnimplementedTemplateServer ¶
type UnimplementedTemplateServer struct {
}
UnimplementedTemplateServer can be embedded to have forward compatible implementations.
func (*UnimplementedTemplateServer) CreateTemplate ¶
func (*UnimplementedTemplateServer) CreateTemplate(ctx context.Context, req *WorkflowTemplate) (*CreateResponse, error)
func (*UnimplementedTemplateServer) DeleteTemplate ¶
func (*UnimplementedTemplateServer) DeleteTemplate(ctx context.Context, req *GetRequest) (*Empty, error)
func (*UnimplementedTemplateServer) GetTemplate ¶
func (*UnimplementedTemplateServer) GetTemplate(ctx context.Context, req *GetRequest) (*WorkflowTemplate, error)
func (*UnimplementedTemplateServer) ListTemplates ¶
func (*UnimplementedTemplateServer) ListTemplates(req *Empty, srv Template_ListTemplatesServer) error
func (*UnimplementedTemplateServer) UpdateTemplate ¶
func (*UnimplementedTemplateServer) UpdateTemplate(ctx context.Context, req *WorkflowTemplate) (*Empty, error)
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 *timestamp.Timestamp `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
UpdatedAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
DeletedAt *timestamp.Timestamp `protobuf:"bytes,6,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"`
Data string `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*WorkflowTemplate) Descriptor ¶
func (*WorkflowTemplate) Descriptor() ([]byte, []int)
func (*WorkflowTemplate) GetCreatedAt ¶
func (m *WorkflowTemplate) GetCreatedAt() *timestamp.Timestamp
func (*WorkflowTemplate) GetData ¶
func (m *WorkflowTemplate) GetData() string
func (*WorkflowTemplate) GetDeletedAt ¶
func (m *WorkflowTemplate) GetDeletedAt() *timestamp.Timestamp
func (*WorkflowTemplate) GetId ¶
func (m *WorkflowTemplate) GetId() string
func (*WorkflowTemplate) GetName ¶
func (m *WorkflowTemplate) GetName() string
func (*WorkflowTemplate) GetUpdatedAt ¶
func (m *WorkflowTemplate) GetUpdatedAt() *timestamp.Timestamp
func (*WorkflowTemplate) ProtoMessage ¶
func (*WorkflowTemplate) ProtoMessage()
func (*WorkflowTemplate) Reset ¶
func (m *WorkflowTemplate) Reset()
func (*WorkflowTemplate) String ¶
func (m *WorkflowTemplate) String() string
func (*WorkflowTemplate) XXX_DiscardUnknown ¶
func (m *WorkflowTemplate) XXX_DiscardUnknown()
func (*WorkflowTemplate) XXX_Marshal ¶
func (m *WorkflowTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WorkflowTemplate) XXX_Merge ¶
func (m *WorkflowTemplate) XXX_Merge(src proto.Message)
func (*WorkflowTemplate) XXX_Size ¶
func (m *WorkflowTemplate) XXX_Size() int
func (*WorkflowTemplate) XXX_Unmarshal ¶
func (m *WorkflowTemplate) XXX_Unmarshal(b []byte) error