Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCitizenStoreServiceServer(s grpc.ServiceRegistrar, srv CitizenStoreServiceServer)
- type CitizenStoreServiceClient
- type CitizenStoreServiceServer
- type GetUserRequest
- func (*GetUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserRequest) GetUserId() int32
- func (*GetUserRequest) ProtoMessage()
- func (x *GetUserRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserRequest) Reset()
- func (x *GetUserRequest) String() string
- func (m *GetUserRequest) Validate() error
- func (m *GetUserRequest) ValidateAll() error
- type GetUserRequestMultiError
- type GetUserRequestValidationError
- func (e GetUserRequestValidationError) Cause() error
- func (e GetUserRequestValidationError) Error() string
- func (e GetUserRequestValidationError) ErrorName() string
- func (e GetUserRequestValidationError) Field() string
- func (e GetUserRequestValidationError) Key() bool
- func (e GetUserRequestValidationError) Reason() string
- type GetUserResponse
- func (*GetUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserResponse) GetUser() *users.User
- func (*GetUserResponse) ProtoMessage()
- func (x *GetUserResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserResponse) Reset()
- func (x *GetUserResponse) String() string
- func (m *GetUserResponse) Validate() error
- func (m *GetUserResponse) ValidateAll() error
- type GetUserResponseMultiError
- type GetUserResponseValidationError
- func (e GetUserResponseValidationError) Cause() error
- func (e GetUserResponseValidationError) Error() string
- func (e GetUserResponseValidationError) ErrorName() string
- func (e GetUserResponseValidationError) Field() string
- func (e GetUserResponseValidationError) Key() bool
- func (e GetUserResponseValidationError) Reason() string
- type ListCitizensRequest
- func (*ListCitizensRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListCitizensRequest) GetPagination() *database.PaginationRequest
- func (x *ListCitizensRequest) GetPhoneNumber() string
- func (x *ListCitizensRequest) GetSearchName() string
- func (x *ListCitizensRequest) GetWanted() bool
- func (*ListCitizensRequest) ProtoMessage()
- func (x *ListCitizensRequest) ProtoReflect() protoreflect.Message
- func (x *ListCitizensRequest) Reset()
- func (x *ListCitizensRequest) String() string
- func (m *ListCitizensRequest) Validate() error
- func (m *ListCitizensRequest) ValidateAll() error
- type ListCitizensRequestMultiError
- type ListCitizensRequestValidationError
- func (e ListCitizensRequestValidationError) Cause() error
- func (e ListCitizensRequestValidationError) Error() string
- func (e ListCitizensRequestValidationError) ErrorName() string
- func (e ListCitizensRequestValidationError) Field() string
- func (e ListCitizensRequestValidationError) Key() bool
- func (e ListCitizensRequestValidationError) Reason() string
- type ListCitizensResponse
- func (*ListCitizensResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListCitizensResponse) GetPagination() *database.PaginationResponse
- func (x *ListCitizensResponse) GetUsers() []*users.User
- func (*ListCitizensResponse) ProtoMessage()
- func (x *ListCitizensResponse) ProtoReflect() protoreflect.Message
- func (x *ListCitizensResponse) Reset()
- func (x *ListCitizensResponse) String() string
- func (m *ListCitizensResponse) Validate() error
- func (m *ListCitizensResponse) ValidateAll() error
- type ListCitizensResponseMultiError
- type ListCitizensResponseValidationError
- func (e ListCitizensResponseValidationError) Cause() error
- func (e ListCitizensResponseValidationError) Error() string
- func (e ListCitizensResponseValidationError) ErrorName() string
- func (e ListCitizensResponseValidationError) Field() string
- func (e ListCitizensResponseValidationError) Key() bool
- func (e ListCitizensResponseValidationError) Reason() string
- type ListUserActivityRequest
- func (*ListUserActivityRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserActivityRequest) GetUserId() int32
- func (*ListUserActivityRequest) ProtoMessage()
- func (x *ListUserActivityRequest) ProtoReflect() protoreflect.Message
- func (x *ListUserActivityRequest) Reset()
- func (x *ListUserActivityRequest) String() string
- func (m *ListUserActivityRequest) Validate() error
- func (m *ListUserActivityRequest) ValidateAll() error
- type ListUserActivityRequestMultiError
- type ListUserActivityRequestValidationError
- func (e ListUserActivityRequestValidationError) Cause() error
- func (e ListUserActivityRequestValidationError) Error() string
- func (e ListUserActivityRequestValidationError) ErrorName() string
- func (e ListUserActivityRequestValidationError) Field() string
- func (e ListUserActivityRequestValidationError) Key() bool
- func (e ListUserActivityRequestValidationError) Reason() string
- type ListUserActivityResponse
- func (*ListUserActivityResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserActivityResponse) GetActivity() []*users.UserActivity
- func (*ListUserActivityResponse) ProtoMessage()
- func (x *ListUserActivityResponse) ProtoReflect() protoreflect.Message
- func (x *ListUserActivityResponse) Reset()
- func (x *ListUserActivityResponse) String() string
- func (m *ListUserActivityResponse) Validate() error
- func (m *ListUserActivityResponse) ValidateAll() error
- type ListUserActivityResponseMultiError
- type ListUserActivityResponseValidationError
- func (e ListUserActivityResponseValidationError) Cause() error
- func (e ListUserActivityResponseValidationError) Error() string
- func (e ListUserActivityResponseValidationError) ErrorName() string
- func (e ListUserActivityResponseValidationError) Field() string
- func (e ListUserActivityResponseValidationError) Key() bool
- func (e ListUserActivityResponseValidationError) Reason() string
- type Server
- func (s *Server) GetUser(ctx context.Context, req *GetUserRequest) (*GetUserResponse, error)
- func (s *Server) ListCitizens(ctx context.Context, req *ListCitizensRequest) (*ListCitizensResponse, error)
- func (s *Server) ListUserActivity(ctx context.Context, req *ListUserActivityRequest) (*ListUserActivityResponse, error)
- func (s *Server) SetUserProps(ctx context.Context, req *SetUserPropsRequest) (*SetUserPropsResponse, error)
- type SetUserPropsRequest
- func (*SetUserPropsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetUserPropsRequest) GetProps() *users.UserProps
- func (x *SetUserPropsRequest) GetReason() string
- func (*SetUserPropsRequest) ProtoMessage()
- func (x *SetUserPropsRequest) ProtoReflect() protoreflect.Message
- func (x *SetUserPropsRequest) Reset()
- func (x *SetUserPropsRequest) String() string
- func (m *SetUserPropsRequest) Validate() error
- func (m *SetUserPropsRequest) ValidateAll() error
- type SetUserPropsRequestMultiError
- type SetUserPropsRequestValidationError
- func (e SetUserPropsRequestValidationError) Cause() error
- func (e SetUserPropsRequestValidationError) Error() string
- func (e SetUserPropsRequestValidationError) ErrorName() string
- func (e SetUserPropsRequestValidationError) Field() string
- func (e SetUserPropsRequestValidationError) Key() bool
- func (e SetUserPropsRequestValidationError) Reason() string
- type SetUserPropsResponse
- func (*SetUserPropsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetUserPropsResponse) GetProps() *users.UserProps
- func (*SetUserPropsResponse) ProtoMessage()
- func (x *SetUserPropsResponse) ProtoReflect() protoreflect.Message
- func (x *SetUserPropsResponse) Reset()
- func (x *SetUserPropsResponse) String() string
- func (m *SetUserPropsResponse) Validate() error
- func (m *SetUserPropsResponse) ValidateAll() error
- type SetUserPropsResponseMultiError
- type SetUserPropsResponseValidationError
- func (e SetUserPropsResponseValidationError) Cause() error
- func (e SetUserPropsResponseValidationError) Error() string
- func (e SetUserPropsResponseValidationError) ErrorName() string
- func (e SetUserPropsResponseValidationError) Field() string
- func (e SetUserPropsResponseValidationError) Key() bool
- func (e SetUserPropsResponseValidationError) Reason() string
- type UnimplementedCitizenStoreServiceServer
- func (UnimplementedCitizenStoreServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
- func (UnimplementedCitizenStoreServiceServer) ListCitizens(context.Context, *ListCitizensRequest) (*ListCitizensResponse, error)
- func (UnimplementedCitizenStoreServiceServer) ListUserActivity(context.Context, *ListUserActivityRequest) (*ListUserActivityResponse, error)
- func (UnimplementedCitizenStoreServiceServer) SetUserProps(context.Context, *SetUserPropsRequest) (*SetUserPropsResponse, error)
- type UnsafeCitizenStoreServiceServer
Constants ¶
const ( CitizenStoreServicePerm perms.Category = "CitizenStoreService" CitizenStoreServiceGetUserPerm perms.Name = "GetUser" CitizenStoreServiceGetUserJobsPermField perms.Key = "Jobs" CitizenStoreServiceListCitizensPerm perms.Name = "ListCitizens" CitizenStoreServiceListCitizensFieldsPermField perms.Key = "Fields" CitizenStoreServiceListUserActivityPerm perms.Name = "ListUserActivity" CitizenStoreServiceListUserActivityFieldsPermField perms.Key = "Fields" CitizenStoreServiceSetUserPropsPerm perms.Name = "SetUserProps" CitizenStoreServiceSetUserPropsFieldsPermField perms.Key = "Fields" )
Variables ¶
var ( FailedQueryErr = status.Error(codes.Internal, "Failed to list/get citizen(s) data!") JobGradeNoPermissionErr = status.Error(codes.NotFound, "No permission to access this citizen (based on the citizen's job)") )
var CitizenStoreService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "services.citizenstore.CitizenStoreService", HandlerType: (*CitizenStoreServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListCitizens", Handler: _CitizenStoreService_ListCitizens_Handler, }, { MethodName: "GetUser", Handler: _CitizenStoreService_GetUser_Handler, }, { MethodName: "ListUserActivity", Handler: _CitizenStoreService_ListUserActivity_Handler, }, { MethodName: "SetUserProps", Handler: _CitizenStoreService_SetUserProps_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "services/citizenstore/citizenstore.proto", }
CitizenStoreService_ServiceDesc is the grpc.ServiceDesc for CitizenStoreService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_services_citizenstore_citizenstore_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCitizenStoreServiceServer ¶
func RegisterCitizenStoreServiceServer(s grpc.ServiceRegistrar, srv CitizenStoreServiceServer)
Types ¶
type CitizenStoreServiceClient ¶
type CitizenStoreServiceClient interface { // @perm: Attrs=Fields/StringList:[]string{"PhoneNumber", "Licenses", "UserProps.Wanted", "UserProps.Job"} ListCitizens(ctx context.Context, in *ListCitizensRequest, opts ...grpc.CallOption) (*ListCitizensResponse, error) // @perm: Attrs=Jobs/JobGradeList GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) // @perm: Attrs=Fields/StringList:[]string{"SourceUser"} ListUserActivity(ctx context.Context, in *ListUserActivityRequest, opts ...grpc.CallOption) (*ListUserActivityResponse, error) // @perm: Attrs=Fields/StringList:[]string{"Wanted", "Job"} SetUserProps(ctx context.Context, in *SetUserPropsRequest, opts ...grpc.CallOption) (*SetUserPropsResponse, error) }
CitizenStoreServiceClient is the client API for CitizenStoreService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewCitizenStoreServiceClient ¶
func NewCitizenStoreServiceClient(cc grpc.ClientConnInterface) CitizenStoreServiceClient
func NewTestCitizenStoreServiceClient ¶
func NewTestCitizenStoreServiceClient(srv CitizenStoreServiceServer) (CitizenStoreServiceClient, context.Context, context.CancelFunc)
type CitizenStoreServiceServer ¶
type CitizenStoreServiceServer interface { // @perm: Attrs=Fields/StringList:[]string{"PhoneNumber", "Licenses", "UserProps.Wanted", "UserProps.Job"} ListCitizens(context.Context, *ListCitizensRequest) (*ListCitizensResponse, error) // @perm: Attrs=Jobs/JobGradeList GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) // @perm: Attrs=Fields/StringList:[]string{"SourceUser"} ListUserActivity(context.Context, *ListUserActivityRequest) (*ListUserActivityResponse, error) // @perm: Attrs=Fields/StringList:[]string{"Wanted", "Job"} SetUserProps(context.Context, *SetUserPropsRequest) (*SetUserPropsResponse, error) // contains filtered or unexported methods }
CitizenStoreServiceServer is the server API for CitizenStoreService service. All implementations must embed UnimplementedCitizenStoreServiceServer for forward compatibility
type GetUserRequest ¶
type GetUserRequest struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetUserId ¶
func (x *GetUserRequest) GetUserId() int32
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) ProtoReflect ¶
func (x *GetUserRequest) ProtoReflect() protoreflect.Message
func (*GetUserRequest) Reset ¶
func (x *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (x *GetUserRequest) String() string
func (*GetUserRequest) Validate ¶
func (m *GetUserRequest) Validate() error
Validate checks the field values on GetUserRequest 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 (*GetUserRequest) ValidateAll ¶
func (m *GetUserRequest) ValidateAll() error
ValidateAll checks the field values on GetUserRequest 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 GetUserRequestMultiError, or nil if none found.
type GetUserRequestMultiError ¶
type GetUserRequestMultiError []error
GetUserRequestMultiError is an error wrapping multiple validation errors returned by GetUserRequest.ValidateAll() if the designated constraints aren't met.
func (GetUserRequestMultiError) AllErrors ¶
func (m GetUserRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUserRequestMultiError) Error ¶
func (m GetUserRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUserRequestValidationError ¶
type GetUserRequestValidationError struct {
// contains filtered or unexported fields
}
GetUserRequestValidationError is the validation error returned by GetUserRequest.Validate if the designated constraints aren't met.
func (GetUserRequestValidationError) Cause ¶
func (e GetUserRequestValidationError) Cause() error
Cause function returns cause value.
func (GetUserRequestValidationError) Error ¶
func (e GetUserRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetUserRequestValidationError) ErrorName ¶
func (e GetUserRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetUserRequestValidationError) Field ¶
func (e GetUserRequestValidationError) Field() string
Field function returns field value.
func (GetUserRequestValidationError) Key ¶
func (e GetUserRequestValidationError) Key() bool
Key function returns key value.
func (GetUserRequestValidationError) Reason ¶
func (e GetUserRequestValidationError) Reason() string
Reason function returns reason value.
type GetUserResponse ¶
type GetUserResponse struct { User *users.User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*GetUserResponse) Descriptor
deprecated
func (*GetUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.
func (*GetUserResponse) GetUser ¶
func (x *GetUserResponse) GetUser() *users.User
func (*GetUserResponse) ProtoMessage ¶
func (*GetUserResponse) ProtoMessage()
func (*GetUserResponse) ProtoReflect ¶
func (x *GetUserResponse) ProtoReflect() protoreflect.Message
func (*GetUserResponse) Reset ¶
func (x *GetUserResponse) Reset()
func (*GetUserResponse) String ¶
func (x *GetUserResponse) String() string
func (*GetUserResponse) Validate ¶
func (m *GetUserResponse) Validate() error
Validate checks the field values on GetUserResponse 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 (*GetUserResponse) ValidateAll ¶
func (m *GetUserResponse) ValidateAll() error
ValidateAll checks the field values on GetUserResponse 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 GetUserResponseMultiError, or nil if none found.
type GetUserResponseMultiError ¶
type GetUserResponseMultiError []error
GetUserResponseMultiError is an error wrapping multiple validation errors returned by GetUserResponse.ValidateAll() if the designated constraints aren't met.
func (GetUserResponseMultiError) AllErrors ¶
func (m GetUserResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUserResponseMultiError) Error ¶
func (m GetUserResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUserResponseValidationError ¶
type GetUserResponseValidationError struct {
// contains filtered or unexported fields
}
GetUserResponseValidationError is the validation error returned by GetUserResponse.Validate if the designated constraints aren't met.
func (GetUserResponseValidationError) Cause ¶
func (e GetUserResponseValidationError) Cause() error
Cause function returns cause value.
func (GetUserResponseValidationError) Error ¶
func (e GetUserResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetUserResponseValidationError) ErrorName ¶
func (e GetUserResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetUserResponseValidationError) Field ¶
func (e GetUserResponseValidationError) Field() string
Field function returns field value.
func (GetUserResponseValidationError) Key ¶
func (e GetUserResponseValidationError) Key() bool
Key function returns key value.
func (GetUserResponseValidationError) Reason ¶
func (e GetUserResponseValidationError) Reason() string
Reason function returns reason value.
type ListCitizensRequest ¶
type ListCitizensRequest struct { Pagination *database.PaginationRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` // Search params SearchName string `protobuf:"bytes,2,opt,name=search_name,json=searchName,proto3" json:"search_name,omitempty"` Wanted bool `protobuf:"varint,3,opt,name=wanted,proto3" json:"wanted,omitempty"` PhoneNumber string `protobuf:"bytes,4,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // contains filtered or unexported fields }
func (*ListCitizensRequest) Descriptor
deprecated
func (*ListCitizensRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListCitizensRequest.ProtoReflect.Descriptor instead.
func (*ListCitizensRequest) GetPagination ¶
func (x *ListCitizensRequest) GetPagination() *database.PaginationRequest
func (*ListCitizensRequest) GetPhoneNumber ¶
func (x *ListCitizensRequest) GetPhoneNumber() string
func (*ListCitizensRequest) GetSearchName ¶
func (x *ListCitizensRequest) GetSearchName() string
func (*ListCitizensRequest) GetWanted ¶
func (x *ListCitizensRequest) GetWanted() bool
func (*ListCitizensRequest) ProtoMessage ¶
func (*ListCitizensRequest) ProtoMessage()
func (*ListCitizensRequest) ProtoReflect ¶
func (x *ListCitizensRequest) ProtoReflect() protoreflect.Message
func (*ListCitizensRequest) Reset ¶
func (x *ListCitizensRequest) Reset()
func (*ListCitizensRequest) String ¶
func (x *ListCitizensRequest) String() string
func (*ListCitizensRequest) Validate ¶
func (m *ListCitizensRequest) Validate() error
Validate checks the field values on ListCitizensRequest 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 (*ListCitizensRequest) ValidateAll ¶
func (m *ListCitizensRequest) ValidateAll() error
ValidateAll checks the field values on ListCitizensRequest 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 ListCitizensRequestMultiError, or nil if none found.
type ListCitizensRequestMultiError ¶
type ListCitizensRequestMultiError []error
ListCitizensRequestMultiError is an error wrapping multiple validation errors returned by ListCitizensRequest.ValidateAll() if the designated constraints aren't met.
func (ListCitizensRequestMultiError) AllErrors ¶
func (m ListCitizensRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListCitizensRequestMultiError) Error ¶
func (m ListCitizensRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListCitizensRequestValidationError ¶
type ListCitizensRequestValidationError struct {
// contains filtered or unexported fields
}
ListCitizensRequestValidationError is the validation error returned by ListCitizensRequest.Validate if the designated constraints aren't met.
func (ListCitizensRequestValidationError) Cause ¶
func (e ListCitizensRequestValidationError) Cause() error
Cause function returns cause value.
func (ListCitizensRequestValidationError) Error ¶
func (e ListCitizensRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListCitizensRequestValidationError) ErrorName ¶
func (e ListCitizensRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListCitizensRequestValidationError) Field ¶
func (e ListCitizensRequestValidationError) Field() string
Field function returns field value.
func (ListCitizensRequestValidationError) Key ¶
func (e ListCitizensRequestValidationError) Key() bool
Key function returns key value.
func (ListCitizensRequestValidationError) Reason ¶
func (e ListCitizensRequestValidationError) Reason() string
Reason function returns reason value.
type ListCitizensResponse ¶
type ListCitizensResponse struct { Pagination *database.PaginationResponse `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` Users []*users.User `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*ListCitizensResponse) Descriptor
deprecated
func (*ListCitizensResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListCitizensResponse.ProtoReflect.Descriptor instead.
func (*ListCitizensResponse) GetPagination ¶
func (x *ListCitizensResponse) GetPagination() *database.PaginationResponse
func (*ListCitizensResponse) GetUsers ¶
func (x *ListCitizensResponse) GetUsers() []*users.User
func (*ListCitizensResponse) ProtoMessage ¶
func (*ListCitizensResponse) ProtoMessage()
func (*ListCitizensResponse) ProtoReflect ¶
func (x *ListCitizensResponse) ProtoReflect() protoreflect.Message
func (*ListCitizensResponse) Reset ¶
func (x *ListCitizensResponse) Reset()
func (*ListCitizensResponse) String ¶
func (x *ListCitizensResponse) String() string
func (*ListCitizensResponse) Validate ¶
func (m *ListCitizensResponse) Validate() error
Validate checks the field values on ListCitizensResponse 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 (*ListCitizensResponse) ValidateAll ¶
func (m *ListCitizensResponse) ValidateAll() error
ValidateAll checks the field values on ListCitizensResponse 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 ListCitizensResponseMultiError, or nil if none found.
type ListCitizensResponseMultiError ¶
type ListCitizensResponseMultiError []error
ListCitizensResponseMultiError is an error wrapping multiple validation errors returned by ListCitizensResponse.ValidateAll() if the designated constraints aren't met.
func (ListCitizensResponseMultiError) AllErrors ¶
func (m ListCitizensResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListCitizensResponseMultiError) Error ¶
func (m ListCitizensResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListCitizensResponseValidationError ¶
type ListCitizensResponseValidationError struct {
// contains filtered or unexported fields
}
ListCitizensResponseValidationError is the validation error returned by ListCitizensResponse.Validate if the designated constraints aren't met.
func (ListCitizensResponseValidationError) Cause ¶
func (e ListCitizensResponseValidationError) Cause() error
Cause function returns cause value.
func (ListCitizensResponseValidationError) Error ¶
func (e ListCitizensResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListCitizensResponseValidationError) ErrorName ¶
func (e ListCitizensResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListCitizensResponseValidationError) Field ¶
func (e ListCitizensResponseValidationError) Field() string
Field function returns field value.
func (ListCitizensResponseValidationError) Key ¶
func (e ListCitizensResponseValidationError) Key() bool
Key function returns key value.
func (ListCitizensResponseValidationError) Reason ¶
func (e ListCitizensResponseValidationError) Reason() string
Reason function returns reason value.
type ListUserActivityRequest ¶
type ListUserActivityRequest struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*ListUserActivityRequest) Descriptor
deprecated
func (*ListUserActivityRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListUserActivityRequest.ProtoReflect.Descriptor instead.
func (*ListUserActivityRequest) GetUserId ¶
func (x *ListUserActivityRequest) GetUserId() int32
func (*ListUserActivityRequest) ProtoMessage ¶
func (*ListUserActivityRequest) ProtoMessage()
func (*ListUserActivityRequest) ProtoReflect ¶
func (x *ListUserActivityRequest) ProtoReflect() protoreflect.Message
func (*ListUserActivityRequest) Reset ¶
func (x *ListUserActivityRequest) Reset()
func (*ListUserActivityRequest) String ¶
func (x *ListUserActivityRequest) String() string
func (*ListUserActivityRequest) Validate ¶
func (m *ListUserActivityRequest) Validate() error
Validate checks the field values on ListUserActivityRequest 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 (*ListUserActivityRequest) ValidateAll ¶
func (m *ListUserActivityRequest) ValidateAll() error
ValidateAll checks the field values on ListUserActivityRequest 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 ListUserActivityRequestMultiError, or nil if none found.
type ListUserActivityRequestMultiError ¶
type ListUserActivityRequestMultiError []error
ListUserActivityRequestMultiError is an error wrapping multiple validation errors returned by ListUserActivityRequest.ValidateAll() if the designated constraints aren't met.
func (ListUserActivityRequestMultiError) AllErrors ¶
func (m ListUserActivityRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListUserActivityRequestMultiError) Error ¶
func (m ListUserActivityRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListUserActivityRequestValidationError ¶
type ListUserActivityRequestValidationError struct {
// contains filtered or unexported fields
}
ListUserActivityRequestValidationError is the validation error returned by ListUserActivityRequest.Validate if the designated constraints aren't met.
func (ListUserActivityRequestValidationError) Cause ¶
func (e ListUserActivityRequestValidationError) Cause() error
Cause function returns cause value.
func (ListUserActivityRequestValidationError) Error ¶
func (e ListUserActivityRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListUserActivityRequestValidationError) ErrorName ¶
func (e ListUserActivityRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListUserActivityRequestValidationError) Field ¶
func (e ListUserActivityRequestValidationError) Field() string
Field function returns field value.
func (ListUserActivityRequestValidationError) Key ¶
func (e ListUserActivityRequestValidationError) Key() bool
Key function returns key value.
func (ListUserActivityRequestValidationError) Reason ¶
func (e ListUserActivityRequestValidationError) Reason() string
Reason function returns reason value.
type ListUserActivityResponse ¶
type ListUserActivityResponse struct { Activity []*users.UserActivity `protobuf:"bytes,1,rep,name=activity,proto3" json:"activity,omitempty"` // contains filtered or unexported fields }
func (*ListUserActivityResponse) Descriptor
deprecated
func (*ListUserActivityResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListUserActivityResponse.ProtoReflect.Descriptor instead.
func (*ListUserActivityResponse) GetActivity ¶
func (x *ListUserActivityResponse) GetActivity() []*users.UserActivity
func (*ListUserActivityResponse) ProtoMessage ¶
func (*ListUserActivityResponse) ProtoMessage()
func (*ListUserActivityResponse) ProtoReflect ¶
func (x *ListUserActivityResponse) ProtoReflect() protoreflect.Message
func (*ListUserActivityResponse) Reset ¶
func (x *ListUserActivityResponse) Reset()
func (*ListUserActivityResponse) String ¶
func (x *ListUserActivityResponse) String() string
func (*ListUserActivityResponse) Validate ¶
func (m *ListUserActivityResponse) Validate() error
Validate checks the field values on ListUserActivityResponse 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 (*ListUserActivityResponse) ValidateAll ¶
func (m *ListUserActivityResponse) ValidateAll() error
ValidateAll checks the field values on ListUserActivityResponse 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 ListUserActivityResponseMultiError, or nil if none found.
type ListUserActivityResponseMultiError ¶
type ListUserActivityResponseMultiError []error
ListUserActivityResponseMultiError is an error wrapping multiple validation errors returned by ListUserActivityResponse.ValidateAll() if the designated constraints aren't met.
func (ListUserActivityResponseMultiError) AllErrors ¶
func (m ListUserActivityResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListUserActivityResponseMultiError) Error ¶
func (m ListUserActivityResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListUserActivityResponseValidationError ¶
type ListUserActivityResponseValidationError struct {
// contains filtered or unexported fields
}
ListUserActivityResponseValidationError is the validation error returned by ListUserActivityResponse.Validate if the designated constraints aren't met.
func (ListUserActivityResponseValidationError) Cause ¶
func (e ListUserActivityResponseValidationError) Cause() error
Cause function returns cause value.
func (ListUserActivityResponseValidationError) Error ¶
func (e ListUserActivityResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListUserActivityResponseValidationError) ErrorName ¶
func (e ListUserActivityResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListUserActivityResponseValidationError) Field ¶
func (e ListUserActivityResponseValidationError) Field() string
Field function returns field value.
func (ListUserActivityResponseValidationError) Key ¶
func (e ListUserActivityResponseValidationError) Key() bool
Key function returns key value.
func (ListUserActivityResponseValidationError) Reason ¶
func (e ListUserActivityResponseValidationError) Reason() string
Reason function returns reason value.
type Server ¶
type Server struct { CitizenStoreServiceServer // contains filtered or unexported fields }
func NewServer ¶
func NewServer(db *sql.DB, p perms.Permissions, c *mstlystcdata.Enricher, aud audit.IAuditer) *Server
func (*Server) GetUser ¶
func (s *Server) GetUser(ctx context.Context, req *GetUserRequest) (*GetUserResponse, error)
func (*Server) ListCitizens ¶
func (s *Server) ListCitizens(ctx context.Context, req *ListCitizensRequest) (*ListCitizensResponse, error)
func (*Server) ListUserActivity ¶
func (s *Server) ListUserActivity(ctx context.Context, req *ListUserActivityRequest) (*ListUserActivityResponse, error)
func (*Server) SetUserProps ¶
func (s *Server) SetUserProps(ctx context.Context, req *SetUserPropsRequest) (*SetUserPropsResponse, error)
type SetUserPropsRequest ¶
type SetUserPropsRequest struct { Props *users.UserProps `protobuf:"bytes,1,opt,name=props,proto3" json:"props,omitempty"` Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` // contains filtered or unexported fields }
func (*SetUserPropsRequest) Descriptor
deprecated
func (*SetUserPropsRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetUserPropsRequest.ProtoReflect.Descriptor instead.
func (*SetUserPropsRequest) GetProps ¶
func (x *SetUserPropsRequest) GetProps() *users.UserProps
func (*SetUserPropsRequest) GetReason ¶
func (x *SetUserPropsRequest) GetReason() string
func (*SetUserPropsRequest) ProtoMessage ¶
func (*SetUserPropsRequest) ProtoMessage()
func (*SetUserPropsRequest) ProtoReflect ¶
func (x *SetUserPropsRequest) ProtoReflect() protoreflect.Message
func (*SetUserPropsRequest) Reset ¶
func (x *SetUserPropsRequest) Reset()
func (*SetUserPropsRequest) String ¶
func (x *SetUserPropsRequest) String() string
func (*SetUserPropsRequest) Validate ¶
func (m *SetUserPropsRequest) Validate() error
Validate checks the field values on SetUserPropsRequest 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 (*SetUserPropsRequest) ValidateAll ¶
func (m *SetUserPropsRequest) ValidateAll() error
ValidateAll checks the field values on SetUserPropsRequest 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 SetUserPropsRequestMultiError, or nil if none found.
type SetUserPropsRequestMultiError ¶
type SetUserPropsRequestMultiError []error
SetUserPropsRequestMultiError is an error wrapping multiple validation errors returned by SetUserPropsRequest.ValidateAll() if the designated constraints aren't met.
func (SetUserPropsRequestMultiError) AllErrors ¶
func (m SetUserPropsRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SetUserPropsRequestMultiError) Error ¶
func (m SetUserPropsRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SetUserPropsRequestValidationError ¶
type SetUserPropsRequestValidationError struct {
// contains filtered or unexported fields
}
SetUserPropsRequestValidationError is the validation error returned by SetUserPropsRequest.Validate if the designated constraints aren't met.
func (SetUserPropsRequestValidationError) Cause ¶
func (e SetUserPropsRequestValidationError) Cause() error
Cause function returns cause value.
func (SetUserPropsRequestValidationError) Error ¶
func (e SetUserPropsRequestValidationError) Error() string
Error satisfies the builtin error interface
func (SetUserPropsRequestValidationError) ErrorName ¶
func (e SetUserPropsRequestValidationError) ErrorName() string
ErrorName returns error name.
func (SetUserPropsRequestValidationError) Field ¶
func (e SetUserPropsRequestValidationError) Field() string
Field function returns field value.
func (SetUserPropsRequestValidationError) Key ¶
func (e SetUserPropsRequestValidationError) Key() bool
Key function returns key value.
func (SetUserPropsRequestValidationError) Reason ¶
func (e SetUserPropsRequestValidationError) Reason() string
Reason function returns reason value.
type SetUserPropsResponse ¶
type SetUserPropsResponse struct { Props *users.UserProps `protobuf:"bytes,1,opt,name=props,proto3" json:"props,omitempty"` // contains filtered or unexported fields }
func (*SetUserPropsResponse) Descriptor
deprecated
func (*SetUserPropsResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetUserPropsResponse.ProtoReflect.Descriptor instead.
func (*SetUserPropsResponse) GetProps ¶
func (x *SetUserPropsResponse) GetProps() *users.UserProps
func (*SetUserPropsResponse) ProtoMessage ¶
func (*SetUserPropsResponse) ProtoMessage()
func (*SetUserPropsResponse) ProtoReflect ¶
func (x *SetUserPropsResponse) ProtoReflect() protoreflect.Message
func (*SetUserPropsResponse) Reset ¶
func (x *SetUserPropsResponse) Reset()
func (*SetUserPropsResponse) String ¶
func (x *SetUserPropsResponse) String() string
func (*SetUserPropsResponse) Validate ¶
func (m *SetUserPropsResponse) Validate() error
Validate checks the field values on SetUserPropsResponse 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 (*SetUserPropsResponse) ValidateAll ¶
func (m *SetUserPropsResponse) ValidateAll() error
ValidateAll checks the field values on SetUserPropsResponse 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 SetUserPropsResponseMultiError, or nil if none found.
type SetUserPropsResponseMultiError ¶
type SetUserPropsResponseMultiError []error
SetUserPropsResponseMultiError is an error wrapping multiple validation errors returned by SetUserPropsResponse.ValidateAll() if the designated constraints aren't met.
func (SetUserPropsResponseMultiError) AllErrors ¶
func (m SetUserPropsResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SetUserPropsResponseMultiError) Error ¶
func (m SetUserPropsResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SetUserPropsResponseValidationError ¶
type SetUserPropsResponseValidationError struct {
// contains filtered or unexported fields
}
SetUserPropsResponseValidationError is the validation error returned by SetUserPropsResponse.Validate if the designated constraints aren't met.
func (SetUserPropsResponseValidationError) Cause ¶
func (e SetUserPropsResponseValidationError) Cause() error
Cause function returns cause value.
func (SetUserPropsResponseValidationError) Error ¶
func (e SetUserPropsResponseValidationError) Error() string
Error satisfies the builtin error interface
func (SetUserPropsResponseValidationError) ErrorName ¶
func (e SetUserPropsResponseValidationError) ErrorName() string
ErrorName returns error name.
func (SetUserPropsResponseValidationError) Field ¶
func (e SetUserPropsResponseValidationError) Field() string
Field function returns field value.
func (SetUserPropsResponseValidationError) Key ¶
func (e SetUserPropsResponseValidationError) Key() bool
Key function returns key value.
func (SetUserPropsResponseValidationError) Reason ¶
func (e SetUserPropsResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedCitizenStoreServiceServer ¶
type UnimplementedCitizenStoreServiceServer struct { }
UnimplementedCitizenStoreServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCitizenStoreServiceServer) GetUser ¶
func (UnimplementedCitizenStoreServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
func (UnimplementedCitizenStoreServiceServer) ListCitizens ¶
func (UnimplementedCitizenStoreServiceServer) ListCitizens(context.Context, *ListCitizensRequest) (*ListCitizensResponse, error)
func (UnimplementedCitizenStoreServiceServer) ListUserActivity ¶
func (UnimplementedCitizenStoreServiceServer) ListUserActivity(context.Context, *ListUserActivityRequest) (*ListUserActivityResponse, error)
func (UnimplementedCitizenStoreServiceServer) SetUserProps ¶
func (UnimplementedCitizenStoreServiceServer) SetUserProps(context.Context, *SetUserPropsRequest) (*SetUserPropsResponse, error)
type UnsafeCitizenStoreServiceServer ¶
type UnsafeCitizenStoreServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCitizenStoreServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CitizenStoreServiceServer will result in compilation errors.