rpc

package
v0.0.0-...-acdf8ed Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2019 License: MIT Imports: 13 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRpc   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterFnAPIHandler

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

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

func (*CreateReq) GetFunction

func (m *CreateReq) GetFunction() *Function

func (*CreateReq) Marshal

func (m *CreateReq) Marshal() (dAtA []byte, err error)

func (*CreateReq) MarshalTo

func (m *CreateReq) MarshalTo(dAtA []byte) (int, error)

func (*CreateReq) ProtoMessage

func (*CreateReq) ProtoMessage()

func (*CreateReq) Reset

func (m *CreateReq) Reset()

func (*CreateReq) Size

func (m *CreateReq) Size() (n int)

func (*CreateReq) String

func (m *CreateReq) String() string

func (*CreateReq) Unmarshal

func (m *CreateReq) Unmarshal(dAtA []byte) error

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

func (m *CreateResp) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*DeleteReq) GetName

func (m *DeleteReq) GetName() string

func (*DeleteReq) Marshal

func (m *DeleteReq) Marshal() (dAtA []byte, err error)

func (*DeleteReq) MarshalTo

func (m *DeleteReq) MarshalTo(dAtA []byte) (int, error)

func (*DeleteReq) ProtoMessage

func (*DeleteReq) ProtoMessage()

func (*DeleteReq) Reset

func (m *DeleteReq) Reset()

func (*DeleteReq) Size

func (m *DeleteReq) Size() (n int)

func (*DeleteReq) String

func (m *DeleteReq) String() string

func (*DeleteReq) Unmarshal

func (m *DeleteReq) Unmarshal(dAtA []byte) error

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

func (m *DeleteResp) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*Function) GetCode

func (m *Function) GetCode() []byte

func (*Function) GetLang

func (m *Function) GetLang() string

func (*Function) GetName

func (m *Function) GetName() string

func (*Function) GetPackage

func (m *Function) GetPackage() bool

func (*Function) GetVars

func (m *Function) GetVars() map[string]string

func (*Function) Marshal

func (m *Function) Marshal() (dAtA []byte, err error)

func (*Function) MarshalTo

func (m *Function) MarshalTo(dAtA []byte) (int, error)

func (*Function) ProtoMessage

func (*Function) ProtoMessage()

func (*Function) Reset

func (m *Function) Reset()

func (*Function) Size

func (m *Function) Size() (n int)

func (*Function) String

func (m *Function) String() string

func (*Function) Unmarshal

func (m *Function) Unmarshal(dAtA []byte) error

type GetReq

type GetReq struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}

func (*GetReq) Descriptor

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

func (*GetReq) GetName

func (m *GetReq) GetName() string

func (*GetReq) Marshal

func (m *GetReq) Marshal() (dAtA []byte, err error)

func (*GetReq) MarshalTo

func (m *GetReq) MarshalTo(dAtA []byte) (int, error)

func (*GetReq) ProtoMessage

func (*GetReq) ProtoMessage()

func (*GetReq) Reset

func (m *GetReq) Reset()

func (*GetReq) Size

func (m *GetReq) Size() (n int)

func (*GetReq) String

func (m *GetReq) String() string

func (*GetReq) Unmarshal

func (m *GetReq) Unmarshal(dAtA []byte) error

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

func (*GetResp) GetLang

func (m *GetResp) GetLang() string

func (*GetResp) GetName

func (m *GetResp) GetName() string

func (*GetResp) GetVersion

func (m *GetResp) GetVersion() int64

func (*GetResp) Marshal

func (m *GetResp) Marshal() (dAtA []byte, err error)

func (*GetResp) MarshalTo

func (m *GetResp) MarshalTo(dAtA []byte) (int, error)

func (*GetResp) ProtoMessage

func (*GetResp) ProtoMessage()

func (*GetResp) Reset

func (m *GetResp) Reset()

func (*GetResp) Size

func (m *GetResp) Size() (n int)

func (*GetResp) String

func (m *GetResp) String() string

func (*GetResp) Unmarshal

func (m *GetResp) Unmarshal(dAtA []byte) error

type ListReq

type ListReq struct {
}

func (*ListReq) Descriptor

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

func (*ListReq) Marshal

func (m *ListReq) Marshal() (dAtA []byte, err error)

func (*ListReq) MarshalTo

func (m *ListReq) MarshalTo(dAtA []byte) (int, error)

func (*ListReq) ProtoMessage

func (*ListReq) ProtoMessage()

func (*ListReq) Reset

func (m *ListReq) Reset()

func (*ListReq) Size

func (m *ListReq) Size() (n int)

func (*ListReq) String

func (m *ListReq) String() string

func (*ListReq) Unmarshal

func (m *ListReq) Unmarshal(dAtA []byte) error

type ListResp

type ListResp struct {
	Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"`
}

func (*ListResp) Descriptor

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

func (*ListResp) GetNames

func (m *ListResp) GetNames() []string

func (*ListResp) Marshal

func (m *ListResp) Marshal() (dAtA []byte, err error)

func (*ListResp) MarshalTo

func (m *ListResp) MarshalTo(dAtA []byte) (int, error)

func (*ListResp) ProtoMessage

func (*ListResp) ProtoMessage()

func (*ListResp) Reset

func (m *ListResp) Reset()

func (*ListResp) Size

func (m *ListResp) Size() (n int)

func (*ListResp) String

func (m *ListResp) String() string

func (*ListResp) Unmarshal

func (m *ListResp) Unmarshal(dAtA []byte) error

type UpdateReq

type UpdateReq struct {
	Function *Function `protobuf:"bytes,1,opt,name=function" json:"function,omitempty"`
}

func (*UpdateReq) Descriptor

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

func (*UpdateReq) GetFunction

func (m *UpdateReq) GetFunction() *Function

func (*UpdateReq) Marshal

func (m *UpdateReq) Marshal() (dAtA []byte, err error)

func (*UpdateReq) MarshalTo

func (m *UpdateReq) MarshalTo(dAtA []byte) (int, error)

func (*UpdateReq) ProtoMessage

func (*UpdateReq) ProtoMessage()

func (*UpdateReq) Reset

func (m *UpdateReq) Reset()

func (*UpdateReq) Size

func (m *UpdateReq) Size() (n int)

func (*UpdateReq) String

func (m *UpdateReq) String() string

func (*UpdateReq) Unmarshal

func (m *UpdateReq) Unmarshal(dAtA []byte) error

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

func (m *UpdateResp) MarshalTo(dAtA []byte) (int, 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

Jump to

Keyboard shortcuts

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