account

package
v0.0.0-...-f5dd006 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 13 Imported by: 1

Documentation

Overview

Package account is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

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

func (*Account) GetCreated

func (m *Account) GetCreated() string

func (*Account) GetDescription

func (m *Account) GetDescription() string

func (*Account) GetId

func (m *Account) GetId() string

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) Reset

func (m *Account) Reset()

func (*Account) String

func (m *Account) String() string

func (*Account) XXX_DiscardUnknown

func (m *Account) XXX_DiscardUnknown()

func (*Account) XXX_Marshal

func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Account) XXX_Merge

func (m *Account) XXX_Merge(src proto.Message)

func (*Account) XXX_Size

func (m *Account) XXX_Size() int

func (*Account) XXX_Unmarshal

func (m *Account) XXX_Unmarshal(b []byte) error

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

Jump to

Keyboard shortcuts

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