Documentation
¶
Index ¶
- Variables
- func RegisterUsersMgmtServiceServer(s *grpc.Server, srv UsersMgmtServiceServer)
- type CreateUserReq
- func (*CreateUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserReq) GetEmail() string
- func (x *CreateUserReq) GetId() string
- func (x *CreateUserReq) GetName() string
- func (x *CreateUserReq) GetPassword() string
- func (*CreateUserReq) ProtoMessage()
- func (x *CreateUserReq) ProtoReflect() protoreflect.Message
- func (x *CreateUserReq) Reset()
- func (x *CreateUserReq) String() string
- func (m *CreateUserReq) Validate() error
- func (m *CreateUserReq) ValidateAll() error
- type CreateUserReqMultiError
- 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)deprecated
- func (*DeleteUserResp) ProtoMessage()
- func (x *DeleteUserResp) ProtoReflect() protoreflect.Message
- func (x *DeleteUserResp) Reset()
- func (x *DeleteUserResp) String() string
- func (m *DeleteUserResp) Validate() error
- func (m *DeleteUserResp) ValidateAll() error
- type DeleteUserRespMultiError
- 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
- type EmailMultiError
- type EmailValidationError
- type GetUsersReq
- func (*GetUsersReq) Descriptor() ([]byte, []int)deprecated
- func (*GetUsersReq) ProtoMessage()
- func (x *GetUsersReq) ProtoReflect() protoreflect.Message
- func (x *GetUsersReq) Reset()
- func (x *GetUsersReq) String() string
- func (m *GetUsersReq) Validate() error
- func (m *GetUsersReq) ValidateAll() error
- type GetUsersReqMultiError
- 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 UnimplementedUsersMgmtServiceServer
- func (*UnimplementedUsersMgmtServiceServer) CreateUser(context.Context, *CreateUserReq) (*User, error)
- func (*UnimplementedUsersMgmtServiceServer) DeleteUser(context.Context, *Email) (*DeleteUserResp, error)
- func (*UnimplementedUsersMgmtServiceServer) GetUser(context.Context, *Email) (*User, error)
- func (*UnimplementedUsersMgmtServiceServer) GetUsers(context.Context, *GetUsersReq) (*Users, error)
- func (*UnimplementedUsersMgmtServiceServer) UpdateSelf(context.Context, *UpdateSelfReq) (*User, error)
- func (*UnimplementedUsersMgmtServiceServer) UpdateUser(context.Context, *UpdateUserReq) (*User, error)
- type UpdateSelfReq
- func (*UpdateSelfReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateSelfReq) GetEmail() string
- func (x *UpdateSelfReq) GetId() string
- func (x *UpdateSelfReq) GetName() string
- func (x *UpdateSelfReq) GetPassword() string
- func (x *UpdateSelfReq) GetPreviousPassword() string
- func (*UpdateSelfReq) ProtoMessage()
- func (x *UpdateSelfReq) ProtoReflect() protoreflect.Message
- func (x *UpdateSelfReq) Reset()
- func (x *UpdateSelfReq) String() string
- func (m *UpdateSelfReq) Validate() error
- func (m *UpdateSelfReq) ValidateAll() error
- type UpdateSelfReqMultiError
- 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)deprecated
- func (x *UpdateUserReq) GetEmail() string
- func (x *UpdateUserReq) GetId() string
- func (x *UpdateUserReq) GetName() string
- func (x *UpdateUserReq) GetPassword() string
- func (*UpdateUserReq) ProtoMessage()
- func (x *UpdateUserReq) ProtoReflect() protoreflect.Message
- func (x *UpdateUserReq) Reset()
- func (x *UpdateUserReq) String() string
- func (m *UpdateUserReq) Validate() error
- func (m *UpdateUserReq) ValidateAll() error
- type UpdateUserReqMultiError
- 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)deprecated
- func (x *User) GetEmail() string
- func (x *User) GetId() string
- func (x *User) GetName() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (m *User) Validate() error
- func (m *User) ValidateAll() error
- type UserMultiError
- type UserValidationError
- type Users
- func (*Users) Descriptor() ([]byte, []int)deprecated
- func (x *Users) GetUsers() map[string]*User
- func (*Users) ProtoMessage()
- func (x *Users) ProtoReflect() protoreflect.Message
- func (x *Users) Reset()
- func (x *Users) String() string
- func (m *Users) Validate() error
- func (m *Users) ValidateAll() error
- type UsersMgmtServiceClient
- type UsersMgmtServiceServer
- type UsersMgmtServiceServerMock
- func (m *UsersMgmtServiceServerMock) CreateUser(ctx context.Context, req *CreateUserReq) (*User, error)
- func (m *UsersMgmtServiceServerMock) DeleteUser(ctx context.Context, req *Email) (*DeleteUserResp, error)
- func (m *UsersMgmtServiceServerMock) GetUser(ctx context.Context, req *Email) (*User, error)
- func (m *UsersMgmtServiceServerMock) GetUsers(ctx context.Context, req *GetUsersReq) (*Users, error)
- func (m *UsersMgmtServiceServerMock) Reset()
- func (m *UsersMgmtServiceServerMock) UpdateSelf(ctx context.Context, req *UpdateSelfReq) (*User, error)
- func (m *UsersMgmtServiceServerMock) UpdateUser(ctx context.Context, req *UpdateUserReq) (*User, error)
- type UsersMultiError
- type UsersValidationError
Constants ¶
This section is empty.
Variables ¶
var File_interservice_local_user_users_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUsersMgmtServiceServer ¶
func RegisterUsersMgmtServiceServer(s *grpc.Server, srv UsersMgmtServiceServer)
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 */ // contains filtered or unexported fields }
func (*CreateUserReq) Descriptor
deprecated
func (*CreateUserReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserReq.ProtoReflect.Descriptor instead.
func (*CreateUserReq) GetEmail ¶
func (x *CreateUserReq) GetEmail() string
func (*CreateUserReq) GetId ¶
func (x *CreateUserReq) GetId() string
func (*CreateUserReq) GetName ¶
func (x *CreateUserReq) GetName() string
func (*CreateUserReq) GetPassword ¶
func (x *CreateUserReq) GetPassword() string
func (*CreateUserReq) ProtoMessage ¶
func (*CreateUserReq) ProtoMessage()
func (*CreateUserReq) ProtoReflect ¶
func (x *CreateUserReq) ProtoReflect() protoreflect.Message
func (*CreateUserReq) Reset ¶
func (x *CreateUserReq) Reset()
func (*CreateUserReq) String ¶
func (x *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, the first error encountered is returned, or nil if there are no violations.
func (*CreateUserReq) ValidateAll ¶
func (m *CreateUserReq) ValidateAll() error
ValidateAll checks the field values on CreateUserReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CreateUserReqMultiError, or nil if none found.
type CreateUserReqMultiError ¶
type CreateUserReqMultiError []error
CreateUserReqMultiError is an error wrapping multiple validation errors returned by CreateUserReq.ValidateAll() if the designated constraints aren't met.
func (CreateUserReqMultiError) AllErrors ¶
func (m CreateUserReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateUserReqMultiError) Error ¶
func (m CreateUserReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
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 {
// contains filtered or unexported fields
}
func (*DeleteUserResp) Descriptor
deprecated
func (*DeleteUserResp) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserResp.ProtoReflect.Descriptor instead.
func (*DeleteUserResp) ProtoMessage ¶
func (*DeleteUserResp) ProtoMessage()
func (*DeleteUserResp) ProtoReflect ¶
func (x *DeleteUserResp) ProtoReflect() protoreflect.Message
func (*DeleteUserResp) Reset ¶
func (x *DeleteUserResp) Reset()
func (*DeleteUserResp) String ¶
func (x *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, the first error encountered is returned, or nil if there are no violations.
func (*DeleteUserResp) ValidateAll ¶
func (m *DeleteUserResp) ValidateAll() error
ValidateAll checks the field values on DeleteUserResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeleteUserRespMultiError, or nil if none found.
type DeleteUserRespMultiError ¶
type DeleteUserRespMultiError []error
DeleteUserRespMultiError is an error wrapping multiple validation errors returned by DeleteUserResp.ValidateAll() if the designated constraints aren't met.
func (DeleteUserRespMultiError) AllErrors ¶
func (m DeleteUserRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteUserRespMultiError) Error ¶
func (m DeleteUserRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
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"` // forbid empty strings; // contains filtered or unexported fields }
func (*Email) Descriptor
deprecated
func (*Email) ProtoMessage ¶
func (*Email) ProtoMessage()
func (*Email) ProtoReflect ¶
func (x *Email) ProtoReflect() protoreflect.Message
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, the first error encountered is returned, or nil if there are no violations.
func (*Email) ValidateAll ¶
ValidateAll checks the field values on Email with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in EmailMultiError, or nil if none found.
type EmailMultiError ¶
type EmailMultiError []error
EmailMultiError is an error wrapping multiple validation errors returned by Email.ValidateAll() if the designated constraints aren't met.
func (EmailMultiError) AllErrors ¶
func (m EmailMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EmailMultiError) Error ¶
func (m EmailMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
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 {
// contains filtered or unexported fields
}
func (*GetUsersReq) Descriptor
deprecated
func (*GetUsersReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUsersReq.ProtoReflect.Descriptor instead.
func (*GetUsersReq) ProtoMessage ¶
func (*GetUsersReq) ProtoMessage()
func (*GetUsersReq) ProtoReflect ¶
func (x *GetUsersReq) ProtoReflect() protoreflect.Message
func (*GetUsersReq) Reset ¶
func (x *GetUsersReq) Reset()
func (*GetUsersReq) String ¶
func (x *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, the first error encountered is returned, or nil if there are no violations.
func (*GetUsersReq) ValidateAll ¶
func (m *GetUsersReq) ValidateAll() error
ValidateAll checks the field values on GetUsersReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetUsersReqMultiError, or nil if none found.
type GetUsersReqMultiError ¶
type GetUsersReqMultiError []error
GetUsersReqMultiError is an error wrapping multiple validation errors returned by GetUsersReq.ValidateAll() if the designated constraints aren't met.
func (GetUsersReqMultiError) AllErrors ¶
func (m GetUsersReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUsersReqMultiError) Error ¶
func (m GetUsersReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
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 UnimplementedUsersMgmtServiceServer ¶
type UnimplementedUsersMgmtServiceServer struct { }
UnimplementedUsersMgmtServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedUsersMgmtServiceServer) CreateUser ¶
func (*UnimplementedUsersMgmtServiceServer) CreateUser(context.Context, *CreateUserReq) (*User, error)
func (*UnimplementedUsersMgmtServiceServer) DeleteUser ¶
func (*UnimplementedUsersMgmtServiceServer) DeleteUser(context.Context, *Email) (*DeleteUserResp, error)
func (*UnimplementedUsersMgmtServiceServer) GetUsers ¶
func (*UnimplementedUsersMgmtServiceServer) GetUsers(context.Context, *GetUsersReq) (*Users, error)
func (*UnimplementedUsersMgmtServiceServer) UpdateSelf ¶
func (*UnimplementedUsersMgmtServiceServer) UpdateSelf(context.Context, *UpdateSelfReq) (*User, error)
func (*UnimplementedUsersMgmtServiceServer) UpdateUser ¶
func (*UnimplementedUsersMgmtServiceServer) UpdateUser(context.Context, *UpdateUserReq) (*User, error)
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 */ // contains filtered or unexported fields }
See UpdateUserReq for other relevant comments.
func (*UpdateSelfReq) Descriptor
deprecated
func (*UpdateSelfReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateSelfReq.ProtoReflect.Descriptor instead.
func (*UpdateSelfReq) GetEmail ¶
func (x *UpdateSelfReq) GetEmail() string
func (*UpdateSelfReq) GetId ¶
func (x *UpdateSelfReq) GetId() string
func (*UpdateSelfReq) GetName ¶
func (x *UpdateSelfReq) GetName() string
func (*UpdateSelfReq) GetPassword ¶
func (x *UpdateSelfReq) GetPassword() string
func (*UpdateSelfReq) GetPreviousPassword ¶
func (x *UpdateSelfReq) GetPreviousPassword() string
func (*UpdateSelfReq) ProtoMessage ¶
func (*UpdateSelfReq) ProtoMessage()
func (*UpdateSelfReq) ProtoReflect ¶
func (x *UpdateSelfReq) ProtoReflect() protoreflect.Message
func (*UpdateSelfReq) Reset ¶
func (x *UpdateSelfReq) Reset()
func (*UpdateSelfReq) String ¶
func (x *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, the first error encountered is returned, or nil if there are no violations.
func (*UpdateSelfReq) ValidateAll ¶
func (m *UpdateSelfReq) ValidateAll() error
ValidateAll checks the field values on UpdateSelfReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateSelfReqMultiError, or nil if none found.
type UpdateSelfReqMultiError ¶
type UpdateSelfReqMultiError []error
UpdateSelfReqMultiError is an error wrapping multiple validation errors returned by UpdateSelfReq.ValidateAll() if the designated constraints aren't met.
func (UpdateSelfReqMultiError) AllErrors ¶
func (m UpdateSelfReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateSelfReqMultiError) Error ¶
func (m UpdateSelfReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
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 */ // contains filtered or unexported fields }
func (*UpdateUserReq) Descriptor
deprecated
func (*UpdateUserReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserReq.ProtoReflect.Descriptor instead.
func (*UpdateUserReq) GetEmail ¶
func (x *UpdateUserReq) GetEmail() string
func (*UpdateUserReq) GetId ¶
func (x *UpdateUserReq) GetId() string
func (*UpdateUserReq) GetName ¶
func (x *UpdateUserReq) GetName() string
func (*UpdateUserReq) GetPassword ¶
func (x *UpdateUserReq) GetPassword() string
func (*UpdateUserReq) ProtoMessage ¶
func (*UpdateUserReq) ProtoMessage()
func (*UpdateUserReq) ProtoReflect ¶
func (x *UpdateUserReq) ProtoReflect() protoreflect.Message
func (*UpdateUserReq) Reset ¶
func (x *UpdateUserReq) Reset()
func (*UpdateUserReq) String ¶
func (x *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, the first error encountered is returned, or nil if there are no violations.
func (*UpdateUserReq) ValidateAll ¶
func (m *UpdateUserReq) ValidateAll() error
ValidateAll checks the field values on UpdateUserReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateUserReqMultiError, or nil if none found.
type UpdateUserReqMultiError ¶
type UpdateUserReqMultiError []error
UpdateUserReqMultiError is an error wrapping multiple validation errors returned by UpdateUserReq.ValidateAll() if the designated constraints aren't met.
func (UpdateUserReqMultiError) AllErrors ¶
func (m UpdateUserReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateUserReqMultiError) Error ¶
func (m UpdateUserReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
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"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
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, the first error encountered is returned, or nil if there are no violations.
func (*User) ValidateAll ¶
ValidateAll checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserMultiError, or nil if none found.
type UserMultiError ¶
type UserMultiError []error
UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.
func (UserMultiError) AllErrors ¶
func (m UserMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserMultiError) Error ¶
func (m UserMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
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 `` /* 191-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Users) Descriptor
deprecated
func (*Users) ProtoMessage ¶
func (*Users) ProtoMessage()
func (*Users) ProtoReflect ¶
func (x *Users) ProtoReflect() protoreflect.Message
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, the first error encountered is returned, or nil if there are no violations.
func (*Users) ValidateAll ¶
ValidateAll checks the field values on Users with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UsersMultiError, or nil if none found.
type UsersMgmtServiceClient ¶
type UsersMgmtServiceClient 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) }
UsersMgmtServiceClient is the client API for UsersMgmtService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUsersMgmtServiceClient ¶
func NewUsersMgmtServiceClient(cc grpc.ClientConnInterface) UsersMgmtServiceClient
type UsersMgmtServiceServer ¶
type UsersMgmtServiceServer 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) }
UsersMgmtServiceServer is the server API for UsersMgmtService service.
type UsersMgmtServiceServerMock ¶
type UsersMgmtServiceServerMock 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 }
UsersMgmtServiceServerMock is the mock-what-you-want struct that stubs all not-overridden methods with "not implemented" returns
func NewUsersMgmtServiceServerMock ¶
func NewUsersMgmtServiceServerMock() *UsersMgmtServiceServerMock
NewUsersMgmtServiceServerMock gives you a fresh instance of UsersMgmtServiceServerMock.
func NewUsersMgmtServiceServerMockWithoutValidation ¶
func NewUsersMgmtServiceServerMockWithoutValidation() *UsersMgmtServiceServerMock
NewUsersMgmtServiceServerMockWithoutValidation gives you a fresh instance of UsersMgmtServiceServerMock which does not attempt to validate requests before passing them to their respective '*Func'.
func (*UsersMgmtServiceServerMock) CreateUser ¶
func (m *UsersMgmtServiceServerMock) CreateUser(ctx context.Context, req *CreateUserReq) (*User, error)
func (*UsersMgmtServiceServerMock) DeleteUser ¶
func (m *UsersMgmtServiceServerMock) DeleteUser(ctx context.Context, req *Email) (*DeleteUserResp, error)
func (*UsersMgmtServiceServerMock) GetUsers ¶
func (m *UsersMgmtServiceServerMock) GetUsers(ctx context.Context, req *GetUsersReq) (*Users, error)
func (*UsersMgmtServiceServerMock) Reset ¶
func (m *UsersMgmtServiceServerMock) Reset()
Reset resets all overridden functions
func (*UsersMgmtServiceServerMock) UpdateSelf ¶
func (m *UsersMgmtServiceServerMock) UpdateSelf(ctx context.Context, req *UpdateSelfReq) (*User, error)
func (*UsersMgmtServiceServerMock) UpdateUser ¶
func (m *UsersMgmtServiceServerMock) UpdateUser(ctx context.Context, req *UpdateUserReq) (*User, error)
type UsersMultiError ¶
type UsersMultiError []error
UsersMultiError is an error wrapping multiple validation errors returned by Users.ValidateAll() if the designated constraints aren't met.
func (UsersMultiError) AllErrors ¶
func (m UsersMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UsersMultiError) Error ¶
func (m UsersMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
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.