Documentation ¶
Overview ¶
Package rpc is a generated protocol buffer package. It is generated from these files: rpc/rpc.proto It has these top-level messages: Function CreateReq CreateResp UpdateReq UpdateResp GetReq GetResp DeleteReq DeleteResp ListReq ListResp
Package rpc is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterFnAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterFnAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FnAPIClient) error
- func RegisterFnAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterFnAPIServer(s *grpc.Server, srv FnAPIServer)
- type CreateReq
- func (*CreateReq) Descriptor() ([]byte, []int)
- func (m *CreateReq) GetFunction() *Function
- func (m *CreateReq) Marshal() (dAtA []byte, err error)
- func (m *CreateReq) MarshalTo(dAtA []byte) (int, error)
- func (*CreateReq) ProtoMessage()
- func (m *CreateReq) Reset()
- func (m *CreateReq) Size() (n int)
- func (m *CreateReq) String() string
- func (m *CreateReq) Unmarshal(dAtA []byte) error
- type CreateResp
- func (*CreateResp) Descriptor() ([]byte, []int)
- func (m *CreateResp) Marshal() (dAtA []byte, err error)
- func (m *CreateResp) MarshalTo(dAtA []byte) (int, error)
- func (*CreateResp) ProtoMessage()
- func (m *CreateResp) Reset()
- func (m *CreateResp) Size() (n int)
- func (m *CreateResp) String() string
- func (m *CreateResp) Unmarshal(dAtA []byte) error
- type DeleteReq
- func (*DeleteReq) Descriptor() ([]byte, []int)
- func (m *DeleteReq) GetName() string
- func (m *DeleteReq) Marshal() (dAtA []byte, err error)
- func (m *DeleteReq) MarshalTo(dAtA []byte) (int, error)
- func (*DeleteReq) ProtoMessage()
- func (m *DeleteReq) Reset()
- func (m *DeleteReq) Size() (n int)
- func (m *DeleteReq) String() string
- func (m *DeleteReq) Unmarshal(dAtA []byte) error
- type DeleteResp
- func (*DeleteResp) Descriptor() ([]byte, []int)
- func (m *DeleteResp) Marshal() (dAtA []byte, err error)
- func (m *DeleteResp) MarshalTo(dAtA []byte) (int, error)
- func (*DeleteResp) ProtoMessage()
- func (m *DeleteResp) Reset()
- func (m *DeleteResp) Size() (n int)
- func (m *DeleteResp) String() string
- func (m *DeleteResp) Unmarshal(dAtA []byte) error
- type FnAPIClient
- type FnAPIServer
- type Function
- func (*Function) Descriptor() ([]byte, []int)
- func (m *Function) GetCode() []byte
- func (m *Function) GetLang() string
- func (m *Function) GetName() string
- func (m *Function) GetPackage() bool
- func (m *Function) GetVars() map[string]string
- func (m *Function) Marshal() (dAtA []byte, err error)
- func (m *Function) MarshalTo(dAtA []byte) (int, error)
- func (*Function) ProtoMessage()
- func (m *Function) Reset()
- func (m *Function) Size() (n int)
- func (m *Function) String() string
- func (m *Function) Unmarshal(dAtA []byte) error
- type GetReq
- func (*GetReq) Descriptor() ([]byte, []int)
- func (m *GetReq) GetName() string
- func (m *GetReq) Marshal() (dAtA []byte, err error)
- func (m *GetReq) MarshalTo(dAtA []byte) (int, error)
- func (*GetReq) ProtoMessage()
- func (m *GetReq) Reset()
- func (m *GetReq) Size() (n int)
- func (m *GetReq) String() string
- func (m *GetReq) Unmarshal(dAtA []byte) error
- type GetResp
- func (*GetResp) Descriptor() ([]byte, []int)
- func (m *GetResp) GetLang() string
- func (m *GetResp) GetName() string
- func (m *GetResp) GetVersion() int64
- func (m *GetResp) Marshal() (dAtA []byte, err error)
- func (m *GetResp) MarshalTo(dAtA []byte) (int, error)
- func (*GetResp) ProtoMessage()
- func (m *GetResp) Reset()
- func (m *GetResp) Size() (n int)
- func (m *GetResp) String() string
- func (m *GetResp) Unmarshal(dAtA []byte) error
- type ListReq
- func (*ListReq) Descriptor() ([]byte, []int)
- func (m *ListReq) Marshal() (dAtA []byte, err error)
- func (m *ListReq) MarshalTo(dAtA []byte) (int, error)
- func (*ListReq) ProtoMessage()
- func (m *ListReq) Reset()
- func (m *ListReq) Size() (n int)
- func (m *ListReq) String() string
- func (m *ListReq) Unmarshal(dAtA []byte) error
- type ListResp
- func (*ListResp) Descriptor() ([]byte, []int)
- func (m *ListResp) GetNames() []string
- func (m *ListResp) Marshal() (dAtA []byte, err error)
- func (m *ListResp) MarshalTo(dAtA []byte) (int, error)
- func (*ListResp) ProtoMessage()
- func (m *ListResp) Reset()
- func (m *ListResp) Size() (n int)
- func (m *ListResp) String() string
- func (m *ListResp) Unmarshal(dAtA []byte) error
- type UpdateReq
- func (*UpdateReq) Descriptor() ([]byte, []int)
- func (m *UpdateReq) GetFunction() *Function
- func (m *UpdateReq) Marshal() (dAtA []byte, err error)
- func (m *UpdateReq) MarshalTo(dAtA []byte) (int, error)
- func (*UpdateReq) ProtoMessage()
- func (m *UpdateReq) Reset()
- func (m *UpdateReq) Size() (n int)
- func (m *UpdateReq) String() string
- func (m *UpdateReq) Unmarshal(dAtA []byte) error
- type UpdateResp
- func (*UpdateResp) Descriptor() ([]byte, []int)
- func (m *UpdateResp) Marshal() (dAtA []byte, err error)
- func (m *UpdateResp) MarshalTo(dAtA []byte) (int, error)
- func (*UpdateResp) ProtoMessage()
- func (m *UpdateResp) Reset()
- func (m *UpdateResp) Size() (n int)
- func (m *UpdateResp) String() string
- func (m *UpdateResp) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRpc = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterFnAPIHandler ¶
RegisterFnAPIHandler registers the http handlers for service FnAPI to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterFnAPIHandlerClient ¶
func RegisterFnAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FnAPIClient) error
RegisterFnAPIHandler registers the http handlers for service FnAPI to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FnAPIClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FnAPIClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "FnAPIClient" to call the correct interceptors.
func RegisterFnAPIHandlerFromEndpoint ¶
func RegisterFnAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterFnAPIHandlerFromEndpoint is same as RegisterFnAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterFnAPIServer ¶
func RegisterFnAPIServer(s *grpc.Server, srv FnAPIServer)
Types ¶
type CreateReq ¶
type CreateReq struct {
Function *Function `protobuf:"bytes,1,opt,name=function" json:"function,omitempty"`
}
func (*CreateReq) Descriptor ¶
func (*CreateReq) GetFunction ¶
func (*CreateReq) ProtoMessage ¶
func (*CreateReq) ProtoMessage()
type CreateResp ¶
type CreateResp struct { }
func (*CreateResp) Descriptor ¶
func (*CreateResp) Descriptor() ([]byte, []int)
func (*CreateResp) Marshal ¶
func (m *CreateResp) Marshal() (dAtA []byte, err error)
func (*CreateResp) ProtoMessage ¶
func (*CreateResp) ProtoMessage()
func (*CreateResp) Reset ¶
func (m *CreateResp) Reset()
func (*CreateResp) Size ¶
func (m *CreateResp) Size() (n int)
func (*CreateResp) String ¶
func (m *CreateResp) String() string
func (*CreateResp) Unmarshal ¶
func (m *CreateResp) Unmarshal(dAtA []byte) error
type DeleteReq ¶
type DeleteReq struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (*DeleteReq) Descriptor ¶
func (*DeleteReq) ProtoMessage ¶
func (*DeleteReq) ProtoMessage()
type DeleteResp ¶
type DeleteResp struct { }
func (*DeleteResp) Descriptor ¶
func (*DeleteResp) Descriptor() ([]byte, []int)
func (*DeleteResp) Marshal ¶
func (m *DeleteResp) Marshal() (dAtA []byte, err error)
func (*DeleteResp) ProtoMessage ¶
func (*DeleteResp) ProtoMessage()
func (*DeleteResp) Reset ¶
func (m *DeleteResp) Reset()
func (*DeleteResp) Size ¶
func (m *DeleteResp) Size() (n int)
func (*DeleteResp) String ¶
func (m *DeleteResp) String() string
func (*DeleteResp) Unmarshal ¶
func (m *DeleteResp) Unmarshal(dAtA []byte) error
type FnAPIClient ¶
type FnAPIClient interface { Create(ctx context.Context, in *CreateReq, opts ...grpc.CallOption) (*CreateResp, error) Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*UpdateResp, error) Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*GetResp, error) Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*DeleteResp, error) List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) }
func NewFnAPIClient ¶
func NewFnAPIClient(cc *grpc.ClientConn) FnAPIClient
type FnAPIServer ¶
type FnAPIServer interface { Create(context.Context, *CreateReq) (*CreateResp, error) Update(context.Context, *UpdateReq) (*UpdateResp, error) Get(context.Context, *GetReq) (*GetResp, error) Delete(context.Context, *DeleteReq) (*DeleteResp, error) List(context.Context, *ListReq) (*ListResp, error) }
type Function ¶
type Function struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Lang string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"` Code []byte `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` Package bool `protobuf:"varint,4,opt,name=package,proto3" json:"package,omitempty"` Vars map[string]string `` /* 142-byte string literal not displayed */ }
func (*Function) Descriptor ¶
func (*Function) GetPackage ¶
func (*Function) ProtoMessage ¶
func (*Function) ProtoMessage()
type GetReq ¶
type GetReq struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (*GetReq) Descriptor ¶
func (*GetReq) ProtoMessage ¶
func (*GetReq) ProtoMessage()
type GetResp ¶
type GetResp struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Lang string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"` Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` }
func (*GetResp) Descriptor ¶
func (*GetResp) GetVersion ¶
func (*GetResp) ProtoMessage ¶
func (*GetResp) ProtoMessage()
type ListReq ¶
type ListReq struct { }
func (*ListReq) Descriptor ¶
func (*ListReq) ProtoMessage ¶
func (*ListReq) ProtoMessage()
type ListResp ¶
type ListResp struct {
Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"`
}
func (*ListResp) Descriptor ¶
func (*ListResp) ProtoMessage ¶
func (*ListResp) ProtoMessage()
type UpdateReq ¶
type UpdateReq struct {
Function *Function `protobuf:"bytes,1,opt,name=function" json:"function,omitempty"`
}
func (*UpdateReq) Descriptor ¶
func (*UpdateReq) GetFunction ¶
func (*UpdateReq) ProtoMessage ¶
func (*UpdateReq) ProtoMessage()
type UpdateResp ¶
type UpdateResp struct { }
func (*UpdateResp) Descriptor ¶
func (*UpdateResp) Descriptor() ([]byte, []int)
func (*UpdateResp) Marshal ¶
func (m *UpdateResp) Marshal() (dAtA []byte, err error)
func (*UpdateResp) ProtoMessage ¶
func (*UpdateResp) ProtoMessage()
func (*UpdateResp) Reset ¶
func (m *UpdateResp) Reset()
func (*UpdateResp) Size ¶
func (m *UpdateResp) Size() (n int)
func (*UpdateResp) String ¶
func (m *UpdateResp) String() string
func (*UpdateResp) Unmarshal ¶
func (m *UpdateResp) Unmarshal(dAtA []byte) error