Documentation ¶
Overview ¶
Package account is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- 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 AccountServiceClient
- type AccountServiceServer
- type Server
- type UpdatePasswordRequest
- func (*UpdatePasswordRequest) Descriptor() ([]byte, []int)
- func (m *UpdatePasswordRequest) GetCurrentPassword() string
- func (m *UpdatePasswordRequest) GetNewPassword() string
- func (m *UpdatePasswordRequest) Marshal() (dAtA []byte, err error)
- func (m *UpdatePasswordRequest) MarshalTo(dAtA []byte) (int, error)
- func (*UpdatePasswordRequest) ProtoMessage()
- func (m *UpdatePasswordRequest) Reset()
- func (m *UpdatePasswordRequest) Size() (n int)
- func (m *UpdatePasswordRequest) String() string
- func (m *UpdatePasswordRequest) Unmarshal(dAtA []byte) error
- func (m *UpdatePasswordRequest) XXX_DiscardUnknown()
- func (m *UpdatePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UpdatePasswordRequest) XXX_Merge(src proto.Message)
- func (m *UpdatePasswordRequest) XXX_Size() int
- func (m *UpdatePasswordRequest) XXX_Unmarshal(b []byte) error
- type UpdatePasswordResponse
- func (*UpdatePasswordResponse) Descriptor() ([]byte, []int)
- func (m *UpdatePasswordResponse) Marshal() (dAtA []byte, err error)
- func (m *UpdatePasswordResponse) MarshalTo(dAtA []byte) (int, error)
- func (*UpdatePasswordResponse) ProtoMessage()
- func (m *UpdatePasswordResponse) Reset()
- func (m *UpdatePasswordResponse) Size() (n int)
- func (m *UpdatePasswordResponse) String() string
- func (m *UpdatePasswordResponse) Unmarshal(dAtA []byte) error
- func (m *UpdatePasswordResponse) XXX_DiscardUnknown()
- func (m *UpdatePasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UpdatePasswordResponse) XXX_Merge(src proto.Message)
- func (m *UpdatePasswordResponse) XXX_Size() int
- func (m *UpdatePasswordResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
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 Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server provides a Session service
func NewServer ¶
func NewServer(sessionMgr *session.SessionManager, settingsMgr *settings.SettingsManager) *Server
NewServer returns a new instance of the Session service
func (*Server) UpdatePassword ¶
func (s *Server) UpdatePassword(ctx context.Context, q *UpdatePasswordRequest) (*UpdatePasswordResponse, error)
UpdatePassword updates the password of the local admin superuser.
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 ¶ added in v0.9.0
func (m *UpdatePasswordRequest) XXX_DiscardUnknown()
func (*UpdatePasswordRequest) XXX_Marshal ¶ added in v0.9.0
func (m *UpdatePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdatePasswordRequest) XXX_Merge ¶ added in v0.9.0
func (dst *UpdatePasswordRequest) XXX_Merge(src proto.Message)
func (*UpdatePasswordRequest) XXX_Size ¶ added in v0.9.0
func (m *UpdatePasswordRequest) XXX_Size() int
func (*UpdatePasswordRequest) XXX_Unmarshal ¶ added in v0.9.0
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 ¶ added in v0.9.0
func (m *UpdatePasswordResponse) XXX_DiscardUnknown()
func (*UpdatePasswordResponse) XXX_Marshal ¶ added in v0.9.0
func (m *UpdatePasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdatePasswordResponse) XXX_Merge ¶ added in v0.9.0
func (dst *UpdatePasswordResponse) XXX_Merge(src proto.Message)
func (*UpdatePasswordResponse) XXX_Size ¶ added in v0.9.0
func (m *UpdatePasswordResponse) XXX_Size() int
func (*UpdatePasswordResponse) XXX_Unmarshal ¶ added in v0.9.0
func (m *UpdatePasswordResponse) XXX_Unmarshal(b []byte) error