account

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 17 Imported by: 20

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")
	ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group")
)

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 {
	CanI(ctx context.Context, in *CanIRequest, opts ...grpc.CallOption) (*CanIResponse, error)
	// UpdatePassword updates an account's password to a new value
	UpdatePassword(ctx context.Context, in *UpdatePasswordRequest, opts ...grpc.CallOption) (*UpdatePasswordResponse, 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 {
	CanI(context.Context, *CanIRequest) (*CanIResponse, error)
	// UpdatePassword updates an account's password to a new value
	UpdatePassword(context.Context, *UpdatePasswordRequest) (*UpdatePasswordResponse, error)
}

AccountServiceServer is the server API for AccountService service.

type CanIRequest added in v1.4.0

type CanIRequest struct {
	Resource             string   `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	Action               string   `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
	Subresource          string   `protobuf:"bytes,3,opt,name=subresource,proto3" json:"subresource,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CanIRequest) Descriptor added in v1.4.0

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

func (*CanIRequest) GetAction added in v1.4.0

func (m *CanIRequest) GetAction() string

func (*CanIRequest) GetResource added in v1.4.0

func (m *CanIRequest) GetResource() string

func (*CanIRequest) GetSubresource added in v1.4.0

func (m *CanIRequest) GetSubresource() string

func (*CanIRequest) Marshal added in v1.4.0

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

func (*CanIRequest) MarshalTo added in v1.4.0

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

func (*CanIRequest) MarshalToSizedBuffer added in v1.4.0

func (m *CanIRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CanIRequest) ProtoMessage added in v1.4.0

func (*CanIRequest) ProtoMessage()

func (*CanIRequest) Reset added in v1.4.0

func (m *CanIRequest) Reset()

func (*CanIRequest) Size added in v1.4.0

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

func (*CanIRequest) String added in v1.4.0

func (m *CanIRequest) String() string

func (*CanIRequest) Unmarshal added in v1.4.0

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

func (*CanIRequest) XXX_DiscardUnknown added in v1.4.0

func (m *CanIRequest) XXX_DiscardUnknown()

func (*CanIRequest) XXX_Marshal added in v1.4.0

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

func (*CanIRequest) XXX_Merge added in v1.4.0

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

func (*CanIRequest) XXX_Size added in v1.4.0

func (m *CanIRequest) XXX_Size() int

func (*CanIRequest) XXX_Unmarshal added in v1.4.0

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

type CanIResponse added in v1.4.0

type CanIResponse struct {
	Value                string   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CanIResponse) Descriptor added in v1.4.0

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

func (*CanIResponse) GetValue added in v1.4.0

func (m *CanIResponse) GetValue() string

func (*CanIResponse) Marshal added in v1.4.0

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

func (*CanIResponse) MarshalTo added in v1.4.0

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

func (*CanIResponse) MarshalToSizedBuffer added in v1.4.0

func (m *CanIResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CanIResponse) ProtoMessage added in v1.4.0

func (*CanIResponse) ProtoMessage()

func (*CanIResponse) Reset added in v1.4.0

func (m *CanIResponse) Reset()

func (*CanIResponse) Size added in v1.4.0

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

func (*CanIResponse) String added in v1.4.0

func (m *CanIResponse) String() string

func (*CanIResponse) Unmarshal added in v1.4.0

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

func (*CanIResponse) XXX_DiscardUnknown added in v1.4.0

func (m *CanIResponse) XXX_DiscardUnknown()

func (*CanIResponse) XXX_Marshal added in v1.4.0

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

func (*CanIResponse) XXX_Merge added in v1.4.0

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

func (*CanIResponse) XXX_Size added in v1.4.0

func (m *CanIResponse) XXX_Size() int

func (*CanIResponse) XXX_Unmarshal added in v1.4.0

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

type UnimplementedAccountServiceServer added in v1.4.0

type UnimplementedAccountServiceServer struct {
}

UnimplementedAccountServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedAccountServiceServer) CanI added in v1.4.0

func (*UnimplementedAccountServiceServer) UpdatePassword added in v1.4.0

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) MarshalToSizedBuffer added in v1.4.0

func (m *UpdatePasswordRequest) MarshalToSizedBuffer(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 (m *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) MarshalToSizedBuffer added in v1.4.0

func (m *UpdatePasswordResponse) MarshalToSizedBuffer(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 (m *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