Documentation ¶
Index ¶
- func RegisterUsersMgmtServer(s *grpc.Server, srv UsersMgmtServer)
- type CreateUserReq
- func (*CreateUserReq) Descriptor() ([]byte, []int)
- func (m *CreateUserReq) GetEmail() string
- func (m *CreateUserReq) GetId() string
- func (m *CreateUserReq) GetName() string
- func (m *CreateUserReq) GetPassword() string
- func (*CreateUserReq) ProtoMessage()
- func (m *CreateUserReq) Reset()
- func (m *CreateUserReq) String() string
- func (m *CreateUserReq) Validate() error
- func (m *CreateUserReq) XXX_DiscardUnknown()
- func (m *CreateUserReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *CreateUserReq) XXX_Merge(src proto.Message)
- func (m *CreateUserReq) XXX_Size() int
- func (m *CreateUserReq) XXX_Unmarshal(b []byte) error
- type CreateUserReqValidationError
- func (e CreateUserReqValidationError) Cause() error
- func (e CreateUserReqValidationError) Error() string
- func (e CreateUserReqValidationError) ErrorName() string
- func (e CreateUserReqValidationError) Field() string
- func (e CreateUserReqValidationError) Key() bool
- func (e CreateUserReqValidationError) Reason() string
- type DeleteUserResp
- func (*DeleteUserResp) Descriptor() ([]byte, []int)
- func (*DeleteUserResp) ProtoMessage()
- func (m *DeleteUserResp) Reset()
- func (m *DeleteUserResp) String() string
- func (m *DeleteUserResp) Validate() error
- func (m *DeleteUserResp) XXX_DiscardUnknown()
- func (m *DeleteUserResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *DeleteUserResp) XXX_Merge(src proto.Message)
- func (m *DeleteUserResp) XXX_Size() int
- func (m *DeleteUserResp) XXX_Unmarshal(b []byte) error
- type DeleteUserRespValidationError
- func (e DeleteUserRespValidationError) Cause() error
- func (e DeleteUserRespValidationError) Error() string
- func (e DeleteUserRespValidationError) ErrorName() string
- func (e DeleteUserRespValidationError) Field() string
- func (e DeleteUserRespValidationError) Key() bool
- func (e DeleteUserRespValidationError) Reason() string
- type Email
- func (*Email) Descriptor() ([]byte, []int)
- func (m *Email) GetEmail() string
- func (*Email) ProtoMessage()
- func (m *Email) Reset()
- func (m *Email) String() string
- func (m *Email) Validate() error
- func (m *Email) XXX_DiscardUnknown()
- func (m *Email) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Email) XXX_Merge(src proto.Message)
- func (m *Email) XXX_Size() int
- func (m *Email) XXX_Unmarshal(b []byte) error
- type EmailValidationError
- type GetUsersReq
- func (*GetUsersReq) Descriptor() ([]byte, []int)
- func (*GetUsersReq) ProtoMessage()
- func (m *GetUsersReq) Reset()
- func (m *GetUsersReq) String() string
- func (m *GetUsersReq) Validate() error
- func (m *GetUsersReq) XXX_DiscardUnknown()
- func (m *GetUsersReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GetUsersReq) XXX_Merge(src proto.Message)
- func (m *GetUsersReq) XXX_Size() int
- func (m *GetUsersReq) XXX_Unmarshal(b []byte) error
- type GetUsersReqValidationError
- func (e GetUsersReqValidationError) Cause() error
- func (e GetUsersReqValidationError) Error() string
- func (e GetUsersReqValidationError) ErrorName() string
- func (e GetUsersReqValidationError) Field() string
- func (e GetUsersReqValidationError) Key() bool
- func (e GetUsersReqValidationError) Reason() string
- type UpdateSelfReq
- func (*UpdateSelfReq) Descriptor() ([]byte, []int)
- func (m *UpdateSelfReq) GetEmail() string
- func (m *UpdateSelfReq) GetId() string
- func (m *UpdateSelfReq) GetName() string
- func (m *UpdateSelfReq) GetPassword() string
- func (m *UpdateSelfReq) GetPreviousPassword() string
- func (*UpdateSelfReq) ProtoMessage()
- func (m *UpdateSelfReq) Reset()
- func (m *UpdateSelfReq) String() string
- func (m *UpdateSelfReq) Validate() error
- func (m *UpdateSelfReq) XXX_DiscardUnknown()
- func (m *UpdateSelfReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UpdateSelfReq) XXX_Merge(src proto.Message)
- func (m *UpdateSelfReq) XXX_Size() int
- func (m *UpdateSelfReq) XXX_Unmarshal(b []byte) error
- type UpdateSelfReqValidationError
- func (e UpdateSelfReqValidationError) Cause() error
- func (e UpdateSelfReqValidationError) Error() string
- func (e UpdateSelfReqValidationError) ErrorName() string
- func (e UpdateSelfReqValidationError) Field() string
- func (e UpdateSelfReqValidationError) Key() bool
- func (e UpdateSelfReqValidationError) Reason() string
- type UpdateUserReq
- func (*UpdateUserReq) Descriptor() ([]byte, []int)
- func (m *UpdateUserReq) GetEmail() string
- func (m *UpdateUserReq) GetId() string
- func (m *UpdateUserReq) GetName() string
- func (m *UpdateUserReq) GetPassword() string
- func (*UpdateUserReq) ProtoMessage()
- func (m *UpdateUserReq) Reset()
- func (m *UpdateUserReq) String() string
- func (m *UpdateUserReq) Validate() error
- func (m *UpdateUserReq) XXX_DiscardUnknown()
- func (m *UpdateUserReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UpdateUserReq) XXX_Merge(src proto.Message)
- func (m *UpdateUserReq) XXX_Size() int
- func (m *UpdateUserReq) XXX_Unmarshal(b []byte) error
- type UpdateUserReqValidationError
- func (e UpdateUserReqValidationError) Cause() error
- func (e UpdateUserReqValidationError) Error() string
- func (e UpdateUserReqValidationError) ErrorName() string
- func (e UpdateUserReqValidationError) Field() string
- func (e UpdateUserReqValidationError) Key() bool
- func (e UpdateUserReqValidationError) Reason() string
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetEmail() string
- func (m *User) GetId() string
- func (m *User) GetName() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) Validate() error
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type UserValidationError
- type Users
- func (*Users) Descriptor() ([]byte, []int)
- func (m *Users) GetUsers() map[string]*User
- func (*Users) ProtoMessage()
- func (m *Users) Reset()
- func (m *Users) String() string
- func (m *Users) Validate() error
- func (m *Users) XXX_DiscardUnknown()
- func (m *Users) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Users) XXX_Merge(src proto.Message)
- func (m *Users) XXX_Size() int
- func (m *Users) XXX_Unmarshal(b []byte) error
- type UsersMgmtClient
- type UsersMgmtServer
- type UsersMgmtServerMock
- func (m *UsersMgmtServerMock) CreateUser(ctx context.Context, req *CreateUserReq) (*User, error)
- func (m *UsersMgmtServerMock) DeleteUser(ctx context.Context, req *Email) (*DeleteUserResp, error)
- func (m *UsersMgmtServerMock) GetUser(ctx context.Context, req *Email) (*User, error)
- func (m *UsersMgmtServerMock) GetUsers(ctx context.Context, req *GetUsersReq) (*Users, error)
- func (m *UsersMgmtServerMock) Reset()
- func (m *UsersMgmtServerMock) UpdateSelf(ctx context.Context, req *UpdateSelfReq) (*User, error)
- func (m *UsersMgmtServerMock) UpdateUser(ctx context.Context, req *UpdateUserReq) (*User, error)
- type UsersValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterUsersMgmtServer ¶
func RegisterUsersMgmtServer(s *grpc.Server, srv UsersMgmtServer)
Types ¶
type CreateUserReq ¶
type CreateUserReq struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty" mapstructure:"id,omitempty"` // forbid empty strings Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"` // Note: we're explicitly more strict than email (RFC 1034), although PGV // knows how to validate an email address using // [(validate.rules).string.email = true]; Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty" toml:"email,omitempty" mapstructure:"email,omitempty"` // Note: password validation happens in the service's handler Password string `` /* 129-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_unrecognized []byte `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_sizecache int32 `json:"-" toml:"-" mapstructure:"-,omitempty"` }
func (*CreateUserReq) Descriptor ¶
func (*CreateUserReq) Descriptor() ([]byte, []int)
func (*CreateUserReq) GetEmail ¶
func (m *CreateUserReq) GetEmail() string
func (*CreateUserReq) GetId ¶
func (m *CreateUserReq) GetId() string
func (*CreateUserReq) GetName ¶
func (m *CreateUserReq) GetName() string
func (*CreateUserReq) GetPassword ¶
func (m *CreateUserReq) GetPassword() string
func (*CreateUserReq) ProtoMessage ¶
func (*CreateUserReq) ProtoMessage()
func (*CreateUserReq) Reset ¶
func (m *CreateUserReq) Reset()
func (*CreateUserReq) String ¶
func (m *CreateUserReq) String() string
func (*CreateUserReq) Validate ¶
func (m *CreateUserReq) Validate() error
Validate checks the field values on CreateUserReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*CreateUserReq) XXX_DiscardUnknown ¶
func (m *CreateUserReq) XXX_DiscardUnknown()
func (*CreateUserReq) XXX_Marshal ¶
func (m *CreateUserReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateUserReq) XXX_Merge ¶
func (dst *CreateUserReq) XXX_Merge(src proto.Message)
func (*CreateUserReq) XXX_Size ¶
func (m *CreateUserReq) XXX_Size() int
func (*CreateUserReq) XXX_Unmarshal ¶
func (m *CreateUserReq) XXX_Unmarshal(b []byte) error
type CreateUserReqValidationError ¶
type CreateUserReqValidationError struct {
// contains filtered or unexported fields
}
CreateUserReqValidationError is the validation error returned by CreateUserReq.Validate if the designated constraints aren't met.
func (CreateUserReqValidationError) Cause ¶
func (e CreateUserReqValidationError) Cause() error
Cause function returns cause value.
func (CreateUserReqValidationError) Error ¶
func (e CreateUserReqValidationError) Error() string
Error satisfies the builtin error interface
func (CreateUserReqValidationError) ErrorName ¶
func (e CreateUserReqValidationError) ErrorName() string
ErrorName returns error name.
func (CreateUserReqValidationError) Field ¶
func (e CreateUserReqValidationError) Field() string
Field function returns field value.
func (CreateUserReqValidationError) Key ¶
func (e CreateUserReqValidationError) Key() bool
Key function returns key value.
func (CreateUserReqValidationError) Reason ¶
func (e CreateUserReqValidationError) Reason() string
Reason function returns reason value.
type DeleteUserResp ¶
type DeleteUserResp struct { XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_unrecognized []byte `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_sizecache int32 `json:"-" toml:"-" mapstructure:"-,omitempty"` }
func (*DeleteUserResp) Descriptor ¶
func (*DeleteUserResp) Descriptor() ([]byte, []int)
func (*DeleteUserResp) ProtoMessage ¶
func (*DeleteUserResp) ProtoMessage()
func (*DeleteUserResp) Reset ¶
func (m *DeleteUserResp) Reset()
func (*DeleteUserResp) String ¶
func (m *DeleteUserResp) String() string
func (*DeleteUserResp) Validate ¶
func (m *DeleteUserResp) Validate() error
Validate checks the field values on DeleteUserResp with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*DeleteUserResp) XXX_DiscardUnknown ¶
func (m *DeleteUserResp) XXX_DiscardUnknown()
func (*DeleteUserResp) XXX_Marshal ¶
func (m *DeleteUserResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeleteUserResp) XXX_Merge ¶
func (dst *DeleteUserResp) XXX_Merge(src proto.Message)
func (*DeleteUserResp) XXX_Size ¶
func (m *DeleteUserResp) XXX_Size() int
func (*DeleteUserResp) XXX_Unmarshal ¶
func (m *DeleteUserResp) XXX_Unmarshal(b []byte) error
type DeleteUserRespValidationError ¶
type DeleteUserRespValidationError struct {
// contains filtered or unexported fields
}
DeleteUserRespValidationError is the validation error returned by DeleteUserResp.Validate if the designated constraints aren't met.
func (DeleteUserRespValidationError) Cause ¶
func (e DeleteUserRespValidationError) Cause() error
Cause function returns cause value.
func (DeleteUserRespValidationError) Error ¶
func (e DeleteUserRespValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteUserRespValidationError) ErrorName ¶
func (e DeleteUserRespValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteUserRespValidationError) Field ¶
func (e DeleteUserRespValidationError) Field() string
Field function returns field value.
func (DeleteUserRespValidationError) Key ¶
func (e DeleteUserRespValidationError) Key() bool
Key function returns key value.
func (DeleteUserRespValidationError) Reason ¶
func (e DeleteUserRespValidationError) Reason() string
Reason function returns reason value.
type Email ¶
type Email struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty" toml:"email,omitempty" mapstructure:"email,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_unrecognized []byte `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_sizecache int32 `json:"-" toml:"-" mapstructure:"-,omitempty"` }
func (*Email) Descriptor ¶
func (*Email) ProtoMessage ¶
func (*Email) ProtoMessage()
func (*Email) Validate ¶
Validate checks the field values on Email with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*Email) XXX_DiscardUnknown ¶
func (m *Email) XXX_DiscardUnknown()
func (*Email) XXX_Marshal ¶
func (*Email) XXX_Unmarshal ¶
type EmailValidationError ¶
type EmailValidationError struct {
// contains filtered or unexported fields
}
EmailValidationError is the validation error returned by Email.Validate if the designated constraints aren't met.
func (EmailValidationError) Cause ¶
func (e EmailValidationError) Cause() error
Cause function returns cause value.
func (EmailValidationError) Error ¶
func (e EmailValidationError) Error() string
Error satisfies the builtin error interface
func (EmailValidationError) ErrorName ¶
func (e EmailValidationError) ErrorName() string
ErrorName returns error name.
func (EmailValidationError) Field ¶
func (e EmailValidationError) Field() string
Field function returns field value.
func (EmailValidationError) Key ¶
func (e EmailValidationError) Key() bool
Key function returns key value.
func (EmailValidationError) Reason ¶
func (e EmailValidationError) Reason() string
Reason function returns reason value.
type GetUsersReq ¶
type GetUsersReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_unrecognized []byte `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_sizecache int32 `json:"-" toml:"-" mapstructure:"-,omitempty"` }
func (*GetUsersReq) Descriptor ¶
func (*GetUsersReq) Descriptor() ([]byte, []int)
func (*GetUsersReq) ProtoMessage ¶
func (*GetUsersReq) ProtoMessage()
func (*GetUsersReq) Reset ¶
func (m *GetUsersReq) Reset()
func (*GetUsersReq) String ¶
func (m *GetUsersReq) String() string
func (*GetUsersReq) Validate ¶
func (m *GetUsersReq) Validate() error
Validate checks the field values on GetUsersReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*GetUsersReq) XXX_DiscardUnknown ¶
func (m *GetUsersReq) XXX_DiscardUnknown()
func (*GetUsersReq) XXX_Marshal ¶
func (m *GetUsersReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetUsersReq) XXX_Merge ¶
func (dst *GetUsersReq) XXX_Merge(src proto.Message)
func (*GetUsersReq) XXX_Size ¶
func (m *GetUsersReq) XXX_Size() int
func (*GetUsersReq) XXX_Unmarshal ¶
func (m *GetUsersReq) XXX_Unmarshal(b []byte) error
type GetUsersReqValidationError ¶
type GetUsersReqValidationError struct {
// contains filtered or unexported fields
}
GetUsersReqValidationError is the validation error returned by GetUsersReq.Validate if the designated constraints aren't met.
func (GetUsersReqValidationError) Cause ¶
func (e GetUsersReqValidationError) Cause() error
Cause function returns cause value.
func (GetUsersReqValidationError) Error ¶
func (e GetUsersReqValidationError) Error() string
Error satisfies the builtin error interface
func (GetUsersReqValidationError) ErrorName ¶
func (e GetUsersReqValidationError) ErrorName() string
ErrorName returns error name.
func (GetUsersReqValidationError) Field ¶
func (e GetUsersReqValidationError) Field() string
Field function returns field value.
func (GetUsersReqValidationError) Key ¶
func (e GetUsersReqValidationError) Key() bool
Key function returns key value.
func (GetUsersReqValidationError) Reason ¶
func (e GetUsersReqValidationError) Reason() string
Reason function returns reason value.
type UpdateSelfReq ¶
type UpdateSelfReq struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty" mapstructure:"id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty" toml:"email,omitempty" mapstructure:"email,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"` // Note: for UpdateSelfReq, the password and previous_password are optional, // but if passed, they must both be passed. Password string `` /* 129-byte string literal not displayed */ PreviousPassword string `` /* 187-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_unrecognized []byte `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_sizecache int32 `json:"-" toml:"-" mapstructure:"-,omitempty"` }
See UpdateUserReq for other relevant comments.
func (*UpdateSelfReq) Descriptor ¶
func (*UpdateSelfReq) Descriptor() ([]byte, []int)
func (*UpdateSelfReq) GetEmail ¶
func (m *UpdateSelfReq) GetEmail() string
func (*UpdateSelfReq) GetId ¶
func (m *UpdateSelfReq) GetId() string
func (*UpdateSelfReq) GetName ¶
func (m *UpdateSelfReq) GetName() string
func (*UpdateSelfReq) GetPassword ¶
func (m *UpdateSelfReq) GetPassword() string
func (*UpdateSelfReq) GetPreviousPassword ¶
func (m *UpdateSelfReq) GetPreviousPassword() string
func (*UpdateSelfReq) ProtoMessage ¶
func (*UpdateSelfReq) ProtoMessage()
func (*UpdateSelfReq) Reset ¶
func (m *UpdateSelfReq) Reset()
func (*UpdateSelfReq) String ¶
func (m *UpdateSelfReq) String() string
func (*UpdateSelfReq) Validate ¶
func (m *UpdateSelfReq) Validate() error
Validate checks the field values on UpdateSelfReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*UpdateSelfReq) XXX_DiscardUnknown ¶
func (m *UpdateSelfReq) XXX_DiscardUnknown()
func (*UpdateSelfReq) XXX_Marshal ¶
func (m *UpdateSelfReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdateSelfReq) XXX_Merge ¶
func (dst *UpdateSelfReq) XXX_Merge(src proto.Message)
func (*UpdateSelfReq) XXX_Size ¶
func (m *UpdateSelfReq) XXX_Size() int
func (*UpdateSelfReq) XXX_Unmarshal ¶
func (m *UpdateSelfReq) XXX_Unmarshal(b []byte) error
type UpdateSelfReqValidationError ¶
type UpdateSelfReqValidationError struct {
// contains filtered or unexported fields
}
UpdateSelfReqValidationError is the validation error returned by UpdateSelfReq.Validate if the designated constraints aren't met.
func (UpdateSelfReqValidationError) Cause ¶
func (e UpdateSelfReqValidationError) Cause() error
Cause function returns cause value.
func (UpdateSelfReqValidationError) Error ¶
func (e UpdateSelfReqValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateSelfReqValidationError) ErrorName ¶
func (e UpdateSelfReqValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateSelfReqValidationError) Field ¶
func (e UpdateSelfReqValidationError) Field() string
Field function returns field value.
func (UpdateSelfReqValidationError) Key ¶
func (e UpdateSelfReqValidationError) Key() bool
Key function returns key value.
func (UpdateSelfReqValidationError) Reason ¶
func (e UpdateSelfReqValidationError) Reason() string
Reason function returns reason value.
type UpdateUserReq ¶
type UpdateUserReq struct { // TODO (tc) Unfortunately ID is not returned by Dex in UpdatePassword. // We currently have ID being returned as part of our update contract // for the gateway API. The only way we are currently populating that // is by passing back to the user exactly what they gave us in the update request. // This isn't ideal, but we have a few options that aren't ideal either: // // 1. Call ListPasswords on every update, find our user, and populate the ID field, // then deprecate the ID field as in input into our update APIs. // // 2. Break our public API (not an option afaik). // // 3. Wait until my GetPassword API merges into Dex and call that on every // update to get the ID, then deprecate the ID field as in input into our update APIs. // This is probably the best option. // https://github.com/dexidp/dex/pull/1271 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty" mapstructure:"id,omitempty"` // Currently, this validation doesn't make much sense, since user's can't change their // email (aka username) via update, but leaving it in since 1) it doesn't hurt and // 2) keep it consistent if we allow it in the future. Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty" toml:"email,omitempty" mapstructure:"email,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"` // Note: for UpdateUserReq, the password is optional Password string `` /* 129-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_unrecognized []byte `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_sizecache int32 `json:"-" toml:"-" mapstructure:"-,omitempty"` }
func (*UpdateUserReq) Descriptor ¶
func (*UpdateUserReq) Descriptor() ([]byte, []int)
func (*UpdateUserReq) GetEmail ¶
func (m *UpdateUserReq) GetEmail() string
func (*UpdateUserReq) GetId ¶
func (m *UpdateUserReq) GetId() string
func (*UpdateUserReq) GetName ¶
func (m *UpdateUserReq) GetName() string
func (*UpdateUserReq) GetPassword ¶
func (m *UpdateUserReq) GetPassword() string
func (*UpdateUserReq) ProtoMessage ¶
func (*UpdateUserReq) ProtoMessage()
func (*UpdateUserReq) Reset ¶
func (m *UpdateUserReq) Reset()
func (*UpdateUserReq) String ¶
func (m *UpdateUserReq) String() string
func (*UpdateUserReq) Validate ¶
func (m *UpdateUserReq) Validate() error
Validate checks the field values on UpdateUserReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*UpdateUserReq) XXX_DiscardUnknown ¶
func (m *UpdateUserReq) XXX_DiscardUnknown()
func (*UpdateUserReq) XXX_Marshal ¶
func (m *UpdateUserReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdateUserReq) XXX_Merge ¶
func (dst *UpdateUserReq) XXX_Merge(src proto.Message)
func (*UpdateUserReq) XXX_Size ¶
func (m *UpdateUserReq) XXX_Size() int
func (*UpdateUserReq) XXX_Unmarshal ¶
func (m *UpdateUserReq) XXX_Unmarshal(b []byte) error
type UpdateUserReqValidationError ¶
type UpdateUserReqValidationError struct {
// contains filtered or unexported fields
}
UpdateUserReqValidationError is the validation error returned by UpdateUserReq.Validate if the designated constraints aren't met.
func (UpdateUserReqValidationError) Cause ¶
func (e UpdateUserReqValidationError) Cause() error
Cause function returns cause value.
func (UpdateUserReqValidationError) Error ¶
func (e UpdateUserReqValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateUserReqValidationError) ErrorName ¶
func (e UpdateUserReqValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateUserReqValidationError) Field ¶
func (e UpdateUserReqValidationError) Field() string
Field function returns field value.
func (UpdateUserReqValidationError) Key ¶
func (e UpdateUserReqValidationError) Key() bool
Key function returns key value.
func (UpdateUserReqValidationError) Reason ¶
func (e UpdateUserReqValidationError) Reason() string
Reason function returns reason value.
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty" mapstructure:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty" toml:"email,omitempty" mapstructure:"email,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_unrecognized []byte `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_sizecache int32 `json:"-" toml:"-" mapstructure:"-,omitempty"` }
func (*User) Descriptor ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) Validate ¶
Validate checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
type UserValidationError ¶
type UserValidationError struct {
// contains filtered or unexported fields
}
UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.
func (UserValidationError) Cause ¶
func (e UserValidationError) Cause() error
Cause function returns cause value.
func (UserValidationError) Error ¶
func (e UserValidationError) Error() string
Error satisfies the builtin error interface
func (UserValidationError) ErrorName ¶
func (e UserValidationError) ErrorName() string
ErrorName returns error name.
func (UserValidationError) Field ¶
func (e UserValidationError) Field() string
Field function returns field value.
func (UserValidationError) Key ¶
func (e UserValidationError) Key() bool
Key function returns key value.
func (UserValidationError) Reason ¶
func (e UserValidationError) Reason() string
Reason function returns reason value.
type Users ¶
type Users struct { Users map[string]*User `` /* 205-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_unrecognized []byte `json:"-" toml:"-" mapstructure:"-,omitempty"` XXX_sizecache int32 `json:"-" toml:"-" mapstructure:"-,omitempty"` }
func (*Users) Descriptor ¶
func (*Users) ProtoMessage ¶
func (*Users) ProtoMessage()
func (*Users) Validate ¶
Validate checks the field values on Users with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*Users) XXX_DiscardUnknown ¶
func (m *Users) XXX_DiscardUnknown()
func (*Users) XXX_Marshal ¶
func (*Users) XXX_Unmarshal ¶
type UsersMgmtClient ¶
type UsersMgmtClient interface { GetUsers(ctx context.Context, in *GetUsersReq, opts ...grpc.CallOption) (*Users, error) GetUser(ctx context.Context, in *Email, opts ...grpc.CallOption) (*User, error) CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*User, error) DeleteUser(ctx context.Context, in *Email, opts ...grpc.CallOption) (*DeleteUserResp, error) UpdateUser(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*User, error) UpdateSelf(ctx context.Context, in *UpdateSelfReq, opts ...grpc.CallOption) (*User, error) }
UsersMgmtClient is the client API for UsersMgmt service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUsersMgmtClient ¶
func NewUsersMgmtClient(cc *grpc.ClientConn) UsersMgmtClient
type UsersMgmtServer ¶
type UsersMgmtServer interface { GetUsers(context.Context, *GetUsersReq) (*Users, error) GetUser(context.Context, *Email) (*User, error) CreateUser(context.Context, *CreateUserReq) (*User, error) DeleteUser(context.Context, *Email) (*DeleteUserResp, error) UpdateUser(context.Context, *UpdateUserReq) (*User, error) UpdateSelf(context.Context, *UpdateSelfReq) (*User, error) }
UsersMgmtServer is the server API for UsersMgmt service.
type UsersMgmtServerMock ¶
type UsersMgmtServerMock struct { GetUsersFunc func(context.Context, *GetUsersReq) (*Users, error) GetUserFunc func(context.Context, *Email) (*User, error) CreateUserFunc func(context.Context, *CreateUserReq) (*User, error) DeleteUserFunc func(context.Context, *Email) (*DeleteUserResp, error) UpdateUserFunc func(context.Context, *UpdateUserReq) (*User, error) UpdateSelfFunc func(context.Context, *UpdateSelfReq) (*User, error) // contains filtered or unexported fields }
UsersMgmtServerMock is the mock-what-you-want struct that stubs all not-overridden methods with "not implemented" returns
func NewUsersMgmtServerMock ¶
func NewUsersMgmtServerMock() *UsersMgmtServerMock
NewUsersMgmtServerMock gives you a fresh instance of UsersMgmtServerMock.
func NewUsersMgmtServerMockWithoutValidation ¶
func NewUsersMgmtServerMockWithoutValidation() *UsersMgmtServerMock
NewUsersMgmtServerMockWithoutValidation gives you a fresh instance of UsersMgmtServerMock which does not attempt to validate requests before passing them to their respective '*Func'.
func (*UsersMgmtServerMock) CreateUser ¶
func (m *UsersMgmtServerMock) CreateUser(ctx context.Context, req *CreateUserReq) (*User, error)
func (*UsersMgmtServerMock) DeleteUser ¶
func (m *UsersMgmtServerMock) DeleteUser(ctx context.Context, req *Email) (*DeleteUserResp, error)
func (*UsersMgmtServerMock) GetUsers ¶
func (m *UsersMgmtServerMock) GetUsers(ctx context.Context, req *GetUsersReq) (*Users, error)
func (*UsersMgmtServerMock) Reset ¶
func (m *UsersMgmtServerMock) Reset()
Reset resets all overridden functions
func (*UsersMgmtServerMock) UpdateSelf ¶
func (m *UsersMgmtServerMock) UpdateSelf(ctx context.Context, req *UpdateSelfReq) (*User, error)
func (*UsersMgmtServerMock) UpdateUser ¶
func (m *UsersMgmtServerMock) UpdateUser(ctx context.Context, req *UpdateUserReq) (*User, error)
type UsersValidationError ¶
type UsersValidationError struct {
// contains filtered or unexported fields
}
UsersValidationError is the validation error returned by Users.Validate if the designated constraints aren't met.
func (UsersValidationError) Cause ¶
func (e UsersValidationError) Cause() error
Cause function returns cause value.
func (UsersValidationError) Error ¶
func (e UsersValidationError) Error() string
Error satisfies the builtin error interface
func (UsersValidationError) ErrorName ¶
func (e UsersValidationError) ErrorName() string
ErrorName returns error name.
func (UsersValidationError) Field ¶
func (e UsersValidationError) Field() string
Field function returns field value.
func (UsersValidationError) Key ¶
func (e UsersValidationError) Key() bool
Key function returns key value.
func (UsersValidationError) Reason ¶
func (e UsersValidationError) Reason() string
Reason function returns reason value.