account

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package account is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

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

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

RegisterAccountServiceHandler 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 AccountServiceClient

type AccountServiceClient interface {
	// UpdatePassword updates an account's password to a new value
	UpdatePassword(ctx context.Context, in *UpdatePasswordRequest, opts ...grpc.CallOption) (*UpdatePasswordResponse, error)
}

func NewAccountServiceClient

func NewAccountServiceClient(cc *grpc.ClientConn) AccountServiceClient

type AccountServiceServer

type AccountServiceServer interface {
	// UpdatePassword updates an account's password to a new value
	UpdatePassword(context.Context, *UpdatePasswordRequest) (*UpdatePasswordResponse, error)
}

type UpdatePasswordRequest

type UpdatePasswordRequest struct {
	NewPassword          string   `protobuf:"bytes,1,opt,name=newPassword,proto3" json:"newPassword,omitempty"`
	CurrentPassword      string   `protobuf:"bytes,2,opt,name=currentPassword,proto3" json:"currentPassword,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UpdatePasswordRequest) Descriptor

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

func (*UpdatePasswordRequest) GetCurrentPassword

func (m *UpdatePasswordRequest) GetCurrentPassword() string

func (*UpdatePasswordRequest) GetNewPassword

func (m *UpdatePasswordRequest) GetNewPassword() string

func (*UpdatePasswordRequest) Marshal

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

func (*UpdatePasswordRequest) MarshalTo

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

func (*UpdatePasswordRequest) ProtoMessage

func (*UpdatePasswordRequest) ProtoMessage()

func (*UpdatePasswordRequest) Reset

func (m *UpdatePasswordRequest) Reset()

func (*UpdatePasswordRequest) Size

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

func (*UpdatePasswordRequest) String

func (m *UpdatePasswordRequest) String() string

func (*UpdatePasswordRequest) Unmarshal

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

func (*UpdatePasswordRequest) XXX_DiscardUnknown

func (m *UpdatePasswordRequest) XXX_DiscardUnknown()

func (*UpdatePasswordRequest) XXX_Marshal

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

func (*UpdatePasswordRequest) XXX_Merge

func (dst *UpdatePasswordRequest) XXX_Merge(src proto.Message)

func (*UpdatePasswordRequest) XXX_Size

func (m *UpdatePasswordRequest) XXX_Size() int

func (*UpdatePasswordRequest) XXX_Unmarshal

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

type UpdatePasswordResponse

type UpdatePasswordResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UpdatePasswordResponse) Descriptor

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

func (*UpdatePasswordResponse) Marshal

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

func (*UpdatePasswordResponse) MarshalTo

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

func (*UpdatePasswordResponse) ProtoMessage

func (*UpdatePasswordResponse) ProtoMessage()

func (*UpdatePasswordResponse) Reset

func (m *UpdatePasswordResponse) Reset()

func (*UpdatePasswordResponse) Size

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

func (*UpdatePasswordResponse) String

func (m *UpdatePasswordResponse) String() string

func (*UpdatePasswordResponse) Unmarshal

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

func (*UpdatePasswordResponse) XXX_DiscardUnknown

func (m *UpdatePasswordResponse) XXX_DiscardUnknown()

func (*UpdatePasswordResponse) XXX_Marshal

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

func (*UpdatePasswordResponse) XXX_Merge

func (dst *UpdatePasswordResponse) XXX_Merge(src proto.Message)

func (*UpdatePasswordResponse) XXX_Size

func (m *UpdatePasswordResponse) XXX_Size() int

func (*UpdatePasswordResponse) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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