Documentation ¶
Overview ¶
Package account is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterAccountServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAccountServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountServiceClient) error
- func RegisterAccountServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAccountServiceServer(s *grpc.Server, srv AccountServiceServer)
- type Account
- func (*Account) Descriptor() ([]byte, []int)
- func (m *Account) GetCreated() string
- func (m *Account) GetDescription() string
- func (m *Account) GetId() string
- func (*Account) ProtoMessage()
- func (m *Account) Reset()
- func (m *Account) String() string
- func (m *Account) XXX_DiscardUnknown()
- func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Account) XXX_Merge(src proto.Message)
- func (m *Account) XXX_Size() int
- func (m *Account) XXX_Unmarshal(b []byte) error
- type AccountRequest
- func (*AccountRequest) Descriptor() ([]byte, []int)
- func (*AccountRequest) ProtoMessage()
- func (m *AccountRequest) Reset()
- func (m *AccountRequest) String() string
- func (m *AccountRequest) XXX_DiscardUnknown()
- func (m *AccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AccountRequest) XXX_Merge(src proto.Message)
- func (m *AccountRequest) XXX_Size() int
- func (m *AccountRequest) XXX_Unmarshal(b []byte) error
- type AccountResponse
- func (*AccountResponse) Descriptor() ([]byte, []int)
- func (m *AccountResponse) GetAccounts() []*Account
- func (*AccountResponse) ProtoMessage()
- func (m *AccountResponse) Reset()
- func (m *AccountResponse) String() string
- func (m *AccountResponse) XXX_DiscardUnknown()
- func (m *AccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AccountResponse) XXX_Merge(src proto.Message)
- func (m *AccountResponse) XXX_Size() int
- func (m *AccountResponse) XXX_Unmarshal(b []byte) error
- type AccountServiceClient
- type AccountServiceServer
- type UnimplementedAccountServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAccountServiceHandler ¶
func RegisterAccountServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAccountServiceHandler registers the http handlers for service AccountService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAccountServiceHandlerClient ¶
func RegisterAccountServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountServiceClient) error
RegisterAccountServiceHandlerClient registers the http handlers for service AccountService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AccountServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AccountServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AccountServiceClient" to call the correct interceptors.
func RegisterAccountServiceHandlerFromEndpoint ¶
func RegisterAccountServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAccountServiceHandlerFromEndpoint is same as RegisterAccountServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAccountServiceServer ¶
func RegisterAccountServiceServer(s *grpc.Server, srv AccountServiceServer)
Types ¶
type Account ¶
type Account struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Created string `protobuf:"bytes,3,opt,name=created,proto3" json:"created,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Account) Descriptor ¶
func (*Account) GetCreated ¶
func (*Account) GetDescription ¶
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) XXX_DiscardUnknown ¶
func (m *Account) XXX_DiscardUnknown()
func (*Account) XXX_Marshal ¶
func (*Account) XXX_Unmarshal ¶
type AccountRequest ¶
type AccountRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AccountRequest) Descriptor ¶
func (*AccountRequest) Descriptor() ([]byte, []int)
func (*AccountRequest) ProtoMessage ¶
func (*AccountRequest) ProtoMessage()
func (*AccountRequest) Reset ¶
func (m *AccountRequest) Reset()
func (*AccountRequest) String ¶
func (m *AccountRequest) String() string
func (*AccountRequest) XXX_DiscardUnknown ¶
func (m *AccountRequest) XXX_DiscardUnknown()
func (*AccountRequest) XXX_Marshal ¶
func (m *AccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AccountRequest) XXX_Merge ¶
func (m *AccountRequest) XXX_Merge(src proto.Message)
func (*AccountRequest) XXX_Size ¶
func (m *AccountRequest) XXX_Size() int
func (*AccountRequest) XXX_Unmarshal ¶
func (m *AccountRequest) XXX_Unmarshal(b []byte) error
type AccountResponse ¶
type AccountResponse struct { Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AccountResponse) Descriptor ¶
func (*AccountResponse) Descriptor() ([]byte, []int)
func (*AccountResponse) GetAccounts ¶
func (m *AccountResponse) GetAccounts() []*Account
func (*AccountResponse) ProtoMessage ¶
func (*AccountResponse) ProtoMessage()
func (*AccountResponse) Reset ¶
func (m *AccountResponse) Reset()
func (*AccountResponse) String ¶
func (m *AccountResponse) String() string
func (*AccountResponse) XXX_DiscardUnknown ¶
func (m *AccountResponse) XXX_DiscardUnknown()
func (*AccountResponse) XXX_Marshal ¶
func (m *AccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AccountResponse) XXX_Merge ¶
func (m *AccountResponse) XXX_Merge(src proto.Message)
func (*AccountResponse) XXX_Size ¶
func (m *AccountResponse) XXX_Size() int
func (*AccountResponse) XXX_Unmarshal ¶
func (m *AccountResponse) XXX_Unmarshal(b []byte) error
type AccountServiceClient ¶
type AccountServiceClient interface {
Account(ctx context.Context, in *AccountRequest, opts ...grpc.CallOption) (*AccountResponse, error)
}
AccountServiceClient is the client API for AccountService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAccountServiceClient ¶
func NewAccountServiceClient(cc *grpc.ClientConn) AccountServiceClient
type AccountServiceServer ¶
type AccountServiceServer interface {
Account(context.Context, *AccountRequest) (*AccountResponse, error)
}
AccountServiceServer is the server API for AccountService service.
type UnimplementedAccountServiceServer ¶
type UnimplementedAccountServiceServer struct { }
UnimplementedAccountServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedAccountServiceServer) Account ¶
func (*UnimplementedAccountServiceServer) Account(ctx context.Context, req *AccountRequest) (*AccountResponse, error)