Documentation
¶
Index ¶
- Constants
- Variables
- func NewUserServiceHandler(svc UserServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type CreateBulkUserItem
- func (*CreateBulkUserItem) Descriptor() ([]byte, []int)deprecated
- func (x *CreateBulkUserItem) GetAge() int32
- func (x *CreateBulkUserItem) GetApiKey() []byte
- func (x *CreateBulkUserItem) GetEmail() string
- func (x *CreateBulkUserItem) GetIsActive() bool
- func (x *CreateBulkUserItem) GetLoginCount() int64
- func (x *CreateBulkUserItem) GetName() string
- func (x *CreateBulkUserItem) GetPassword() string
- func (x *CreateBulkUserItem) GetPreferences() string
- func (x *CreateBulkUserItem) GetRating() float64
- func (*CreateBulkUserItem) ProtoMessage()
- func (x *CreateBulkUserItem) ProtoReflect() protoreflect.Message
- func (x *CreateBulkUserItem) Reset()
- func (x *CreateBulkUserItem) String() string
- type CreateBulkUserRequest
- func (*CreateBulkUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateBulkUserRequest) GetItems() []*CreateBulkUserItem
- func (*CreateBulkUserRequest) ProtoMessage()
- func (x *CreateBulkUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateBulkUserRequest) Reset()
- func (x *CreateBulkUserRequest) String() string
- type CreateBulkUserResponse
- func (*CreateBulkUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateBulkUserResponse) GetUsers() []*User
- func (*CreateBulkUserResponse) ProtoMessage()
- func (x *CreateBulkUserResponse) ProtoReflect() protoreflect.Message
- func (x *CreateBulkUserResponse) Reset()
- func (x *CreateBulkUserResponse) String() string
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetAge() int32
- func (x *CreateUserRequest) GetApiKey() []byte
- func (x *CreateUserRequest) GetEmail() string
- func (x *CreateUserRequest) GetIsActive() bool
- func (x *CreateUserRequest) GetLoginCount() int64
- func (x *CreateUserRequest) GetName() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetPreferences() string
- func (x *CreateUserRequest) GetRating() float64
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- func (r *CreateUserRequest) Validate() error
- type DeleteAllUserRequest
- type DeleteUserRequest
- type GetUserByEmailRequest
- func (*GetUserByEmailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserByEmailRequest) GetEmail() string
- func (*GetUserByEmailRequest) ProtoMessage()
- func (x *GetUserByEmailRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserByEmailRequest) Reset()
- func (x *GetUserByEmailRequest) String() string
- type GetUserByIDRequest
- type ListActiveRequest
- func (*ListActiveRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListActiveRequest) GetIsActive() bool
- func (x *ListActiveRequest) GetLimit() int32
- func (x *ListActiveRequest) GetOffset() int32
- func (*ListActiveRequest) ProtoMessage()
- func (x *ListActiveRequest) ProtoReflect() protoreflect.Message
- func (x *ListActiveRequest) Reset()
- func (x *ListActiveRequest) String() string
- type ListActiveResponse
- func (*ListActiveResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListActiveResponse) GetUsers() []*User
- func (*ListActiveResponse) ProtoMessage()
- func (x *ListActiveResponse) ProtoReflect() protoreflect.Message
- func (x *ListActiveResponse) Reset()
- func (x *ListActiveResponse) String() string
- type ListAllUserRequest
- type ListAllUserResponse
- func (*ListAllUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListAllUserResponse) GetUsers() []*User
- func (*ListAllUserResponse) ProtoMessage()
- func (x *ListAllUserResponse) ProtoReflect() protoreflect.Message
- func (x *ListAllUserResponse) Reset()
- func (x *ListAllUserResponse) String() string
- type ListUserFilterByAgeNameRequest
- func (*ListUserFilterByAgeNameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserFilterByAgeNameRequest) GetLimit() int32
- func (x *ListUserFilterByAgeNameRequest) GetMaxAge() int32
- func (x *ListUserFilterByAgeNameRequest) GetMinAge() int32
- func (x *ListUserFilterByAgeNameRequest) GetName() string
- func (x *ListUserFilterByAgeNameRequest) GetOffset() int32
- func (*ListUserFilterByAgeNameRequest) ProtoMessage()
- func (x *ListUserFilterByAgeNameRequest) ProtoReflect() protoreflect.Message
- func (x *ListUserFilterByAgeNameRequest) Reset()
- func (x *ListUserFilterByAgeNameRequest) String() string
- type ListUserFilterByAgeNameResponse
- func (*ListUserFilterByAgeNameResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserFilterByAgeNameResponse) GetUsers() []*User
- func (*ListUserFilterByAgeNameResponse) ProtoMessage()
- func (x *ListUserFilterByAgeNameResponse) ProtoReflect() protoreflect.Message
- func (x *ListUserFilterByAgeNameResponse) Reset()
- func (x *ListUserFilterByAgeNameResponse) String() string
- type UnimplementedUserServiceHandler
- func (UnimplementedUserServiceHandler) Create(context.Context, *connect.Request[CreateUserRequest]) (*connect.Response[User], error)
- func (UnimplementedUserServiceHandler) CreateBulk(context.Context, *connect.Request[CreateBulkUserRequest]) (*connect.Response[CreateBulkUserResponse], error)
- func (UnimplementedUserServiceHandler) Delete(context.Context, *connect.Request[DeleteUserRequest]) (*connect.Response[emptypb.Empty], error)
- func (UnimplementedUserServiceHandler) DeleteAll(context.Context, *connect.Request[DeleteAllUserRequest]) (*connect.Response[emptypb.Empty], error)
- func (UnimplementedUserServiceHandler) FilterByAgeName(context.Context, *connect.Request[ListUserFilterByAgeNameRequest]) (*connect.Response[ListUserFilterByAgeNameResponse], error)
- func (UnimplementedUserServiceHandler) GetByEmail(context.Context, *connect.Request[GetUserByEmailRequest]) (*connect.Response[User], error)
- func (UnimplementedUserServiceHandler) GetByID(context.Context, *connect.Request[GetUserByIDRequest]) (*connect.Response[User], error)
- func (UnimplementedUserServiceHandler) ListActive(context.Context, *connect.Request[ListActiveRequest]) (*connect.Response[ListActiveResponse], error)
- func (UnimplementedUserServiceHandler) ListAll(context.Context, *connect.Request[ListAllUserRequest]) (*connect.Response[ListAllUserResponse], error)
- func (UnimplementedUserServiceHandler) Update(context.Context, *connect.Request[UpdateUserRequest]) (*connect.Response[User], error)
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetAge() int32
- func (x *UpdateUserRequest) GetEmail() string
- func (x *UpdateUserRequest) GetID() int32
- func (x *UpdateUserRequest) GetIsActive() bool
- func (x *UpdateUserRequest) GetLoginCount() int64
- func (x *UpdateUserRequest) GetName() string
- func (x *UpdateUserRequest) GetPassword() string
- func (x *UpdateUserRequest) GetPreferences() string
- func (x *UpdateUserRequest) GetRating() float64
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- func (r *UpdateUserRequest) Validate() error
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAge() int32
- func (x *User) GetApiKey() []byte
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetID() int32
- func (x *User) GetIsActive() bool
- func (x *User) GetLoginCount() int64
- func (x *User) GetName() string
- func (x *User) GetPreferences() string
- func (x *User) GetRating() float64
- func (x *User) GetUpdatedAt() *timestamppb.Timestamp
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceHandler
- type ValidateInterceptor
- func (i *ValidateInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (i *ValidateInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (i *ValidateInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
Constants ¶
const ( // UserServiceCreateProcedure is the fully-qualified name of the UserService's Create RPC. UserServiceCreateProcedure = "/entlite.UserService/Create" // UserServiceGetByIDProcedure is the fully-qualified name of the UserService's GetByID RPC. UserServiceGetByIDProcedure = "/entlite.UserService/GetByID" // UserServiceUpdateProcedure is the fully-qualified name of the UserService's Update RPC. UserServiceUpdateProcedure = "/entlite.UserService/Update" // UserServiceDeleteProcedure is the fully-qualified name of the UserService's Delete RPC. UserServiceDeleteProcedure = "/entlite.UserService/Delete" // UserServiceCreateBulkProcedure is the fully-qualified name of the UserService's CreateBulk RPC. UserServiceCreateBulkProcedure = "/entlite.UserService/CreateBulk" // UserServiceGetByEmailProcedure is the fully-qualified name of the UserService's GetByEmail RPC. UserServiceGetByEmailProcedure = "/entlite.UserService/GetByEmail" // UserServiceListAllProcedure is the fully-qualified name of the UserService's ListAll RPC. UserServiceListAllProcedure = "/entlite.UserService/ListAll" // UserServiceDeleteAllProcedure is the fully-qualified name of the UserService's DeleteAll RPC. UserServiceDeleteAllProcedure = "/entlite.UserService/DeleteAll" // UserServiceListActiveProcedure is the fully-qualified name of the UserService's ListActive RPC. UserServiceListActiveProcedure = "/entlite.UserService/ListActive" // UserServiceFilterByAgeNameProcedure is the fully-qualified name of the UserService's // FilterByAgeName RPC. UserServiceFilterByAgeNameProcedure = "/entlite.UserService/FilterByAgeName" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
const (
// UserServiceName is the fully-qualified name of the UserService service.
UserServiceName = "entlite.UserService"
)
Variables ¶
var File_schema_proto protoreflect.FileDescriptor
Functions ¶
func NewUserServiceHandler ¶
func NewUserServiceHandler(svc UserServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewUserServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type CreateBulkUserItem ¶
type CreateBulkUserItem struct {
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
// Full name, e.g. "Jane Doe"
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Age *int32 `protobuf:"varint,4,opt,name=age,proto3,oneof" json:"age,omitempty"`
Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`
ApiKey []byte `protobuf:"bytes,6,opt,name=api_key,json=apiKey,proto3,oneof" json:"api_key,omitempty"`
IsActive *bool `protobuf:"varint,7,opt,name=is_active,json=isActive,proto3,oneof" json:"is_active,omitempty"`
LoginCount *int64 `protobuf:"varint,8,opt,name=login_count,json=loginCount,proto3,oneof" json:"login_count,omitempty"`
Rating *float64 `protobuf:"fixed64,9,opt,name=rating,proto3,oneof" json:"rating,omitempty"`
// UI preferences, e.g. {"theme":"dark"}
Preferences *string `protobuf:"bytes,10,opt,name=preferences,proto3,oneof" json:"preferences,omitempty"`
// contains filtered or unexported fields
}
func (*CreateBulkUserItem) Descriptor
deprecated
func (*CreateBulkUserItem) Descriptor() ([]byte, []int)
Deprecated: Use CreateBulkUserItem.ProtoReflect.Descriptor instead.
func (*CreateBulkUserItem) GetAge ¶
func (x *CreateBulkUserItem) GetAge() int32
func (*CreateBulkUserItem) GetApiKey ¶
func (x *CreateBulkUserItem) GetApiKey() []byte
func (*CreateBulkUserItem) GetEmail ¶
func (x *CreateBulkUserItem) GetEmail() string
func (*CreateBulkUserItem) GetIsActive ¶
func (x *CreateBulkUserItem) GetIsActive() bool
func (*CreateBulkUserItem) GetLoginCount ¶
func (x *CreateBulkUserItem) GetLoginCount() int64
func (*CreateBulkUserItem) GetName ¶
func (x *CreateBulkUserItem) GetName() string
func (*CreateBulkUserItem) GetPassword ¶
func (x *CreateBulkUserItem) GetPassword() string
func (*CreateBulkUserItem) GetPreferences ¶
func (x *CreateBulkUserItem) GetPreferences() string
func (*CreateBulkUserItem) GetRating ¶
func (x *CreateBulkUserItem) GetRating() float64
func (*CreateBulkUserItem) ProtoMessage ¶
func (*CreateBulkUserItem) ProtoMessage()
func (*CreateBulkUserItem) ProtoReflect ¶
func (x *CreateBulkUserItem) ProtoReflect() protoreflect.Message
func (*CreateBulkUserItem) Reset ¶
func (x *CreateBulkUserItem) Reset()
func (*CreateBulkUserItem) String ¶
func (x *CreateBulkUserItem) String() string
type CreateBulkUserRequest ¶
type CreateBulkUserRequest struct {
Items []*CreateBulkUserItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
// contains filtered or unexported fields
}
func (*CreateBulkUserRequest) Descriptor
deprecated
func (*CreateBulkUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateBulkUserRequest.ProtoReflect.Descriptor instead.
func (*CreateBulkUserRequest) GetItems ¶
func (x *CreateBulkUserRequest) GetItems() []*CreateBulkUserItem
func (*CreateBulkUserRequest) ProtoMessage ¶
func (*CreateBulkUserRequest) ProtoMessage()
func (*CreateBulkUserRequest) ProtoReflect ¶
func (x *CreateBulkUserRequest) ProtoReflect() protoreflect.Message
func (*CreateBulkUserRequest) Reset ¶
func (x *CreateBulkUserRequest) Reset()
func (*CreateBulkUserRequest) String ¶
func (x *CreateBulkUserRequest) String() string
type CreateBulkUserResponse ¶
type CreateBulkUserResponse struct {
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
// contains filtered or unexported fields
}
func (*CreateBulkUserResponse) Descriptor
deprecated
func (*CreateBulkUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateBulkUserResponse.ProtoReflect.Descriptor instead.
func (*CreateBulkUserResponse) GetUsers ¶
func (x *CreateBulkUserResponse) GetUsers() []*User
func (*CreateBulkUserResponse) ProtoMessage ¶
func (*CreateBulkUserResponse) ProtoMessage()
func (*CreateBulkUserResponse) ProtoReflect ¶
func (x *CreateBulkUserResponse) ProtoReflect() protoreflect.Message
func (*CreateBulkUserResponse) Reset ¶
func (x *CreateBulkUserResponse) Reset()
func (*CreateBulkUserResponse) String ¶
func (x *CreateBulkUserResponse) String() string
type CreateUserRequest ¶
type CreateUserRequest struct {
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
// Full name, e.g. "Jane Doe"
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Age *int32 `protobuf:"varint,4,opt,name=age,proto3,oneof" json:"age,omitempty"`
Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`
ApiKey []byte `protobuf:"bytes,6,opt,name=api_key,json=apiKey,proto3,oneof" json:"api_key,omitempty"`
IsActive *bool `protobuf:"varint,7,opt,name=is_active,json=isActive,proto3,oneof" json:"is_active,omitempty"`
LoginCount *int64 `protobuf:"varint,8,opt,name=login_count,json=loginCount,proto3,oneof" json:"login_count,omitempty"`
Rating *float64 `protobuf:"fixed64,9,opt,name=rating,proto3,oneof" json:"rating,omitempty"`
// UI preferences, e.g. {"theme":"dark"}
Preferences *string `protobuf:"bytes,10,opt,name=preferences,proto3,oneof" json:"preferences,omitempty"`
// contains filtered or unexported fields
}
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetAge ¶
func (x *CreateUserRequest) GetAge() int32
func (*CreateUserRequest) GetApiKey ¶
func (x *CreateUserRequest) GetApiKey() []byte
func (*CreateUserRequest) GetEmail ¶
func (x *CreateUserRequest) GetEmail() string
func (*CreateUserRequest) GetIsActive ¶
func (x *CreateUserRequest) GetIsActive() bool
func (*CreateUserRequest) GetLoginCount ¶
func (x *CreateUserRequest) GetLoginCount() int64
func (*CreateUserRequest) GetName ¶
func (x *CreateUserRequest) GetName() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetPreferences ¶
func (x *CreateUserRequest) GetPreferences() string
func (*CreateUserRequest) GetRating ¶
func (x *CreateUserRequest) GetRating() float64
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
func (*CreateUserRequest) Validate ¶
func (r *CreateUserRequest) Validate() error
type DeleteAllUserRequest ¶
type DeleteAllUserRequest struct {
// contains filtered or unexported fields
}
func (*DeleteAllUserRequest) Descriptor
deprecated
func (*DeleteAllUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteAllUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteAllUserRequest) ProtoMessage ¶
func (*DeleteAllUserRequest) ProtoMessage()
func (*DeleteAllUserRequest) ProtoReflect ¶
func (x *DeleteAllUserRequest) ProtoReflect() protoreflect.Message
func (*DeleteAllUserRequest) Reset ¶
func (x *DeleteAllUserRequest) Reset()
func (*DeleteAllUserRequest) String ¶
func (x *DeleteAllUserRequest) String() string
type DeleteUserRequest ¶
type DeleteUserRequest struct {
ID int32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteUserRequest) Descriptor
deprecated
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) GetID ¶
func (x *DeleteUserRequest) GetID() int32
func (*DeleteUserRequest) ProtoMessage ¶
func (*DeleteUserRequest) ProtoMessage()
func (*DeleteUserRequest) ProtoReflect ¶
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserRequest) Reset ¶
func (x *DeleteUserRequest) Reset()
func (*DeleteUserRequest) String ¶
func (x *DeleteUserRequest) String() string
type GetUserByEmailRequest ¶
type GetUserByEmailRequest struct {
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserByEmailRequest) Descriptor
deprecated
func (*GetUserByEmailRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByEmailRequest.ProtoReflect.Descriptor instead.
func (*GetUserByEmailRequest) GetEmail ¶
func (x *GetUserByEmailRequest) GetEmail() string
func (*GetUserByEmailRequest) ProtoMessage ¶
func (*GetUserByEmailRequest) ProtoMessage()
func (*GetUserByEmailRequest) ProtoReflect ¶
func (x *GetUserByEmailRequest) ProtoReflect() protoreflect.Message
func (*GetUserByEmailRequest) Reset ¶
func (x *GetUserByEmailRequest) Reset()
func (*GetUserByEmailRequest) String ¶
func (x *GetUserByEmailRequest) String() string
type GetUserByIDRequest ¶
type GetUserByIDRequest struct {
ID int32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserByIDRequest) Descriptor
deprecated
func (*GetUserByIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByIDRequest.ProtoReflect.Descriptor instead.
func (*GetUserByIDRequest) GetID ¶
func (x *GetUserByIDRequest) GetID() int32
func (*GetUserByIDRequest) ProtoMessage ¶
func (*GetUserByIDRequest) ProtoMessage()
func (*GetUserByIDRequest) ProtoReflect ¶
func (x *GetUserByIDRequest) ProtoReflect() protoreflect.Message
func (*GetUserByIDRequest) Reset ¶
func (x *GetUserByIDRequest) Reset()
func (*GetUserByIDRequest) String ¶
func (x *GetUserByIDRequest) String() string
type ListActiveRequest ¶
type ListActiveRequest struct {
Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
IsActive bool `protobuf:"varint,3,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"`
// contains filtered or unexported fields
}
func (*ListActiveRequest) Descriptor
deprecated
func (*ListActiveRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListActiveRequest.ProtoReflect.Descriptor instead.
func (*ListActiveRequest) GetIsActive ¶
func (x *ListActiveRequest) GetIsActive() bool
func (*ListActiveRequest) GetLimit ¶
func (x *ListActiveRequest) GetLimit() int32
func (*ListActiveRequest) GetOffset ¶
func (x *ListActiveRequest) GetOffset() int32
func (*ListActiveRequest) ProtoMessage ¶
func (*ListActiveRequest) ProtoMessage()
func (*ListActiveRequest) ProtoReflect ¶
func (x *ListActiveRequest) ProtoReflect() protoreflect.Message
func (*ListActiveRequest) Reset ¶
func (x *ListActiveRequest) Reset()
func (*ListActiveRequest) String ¶
func (x *ListActiveRequest) String() string
type ListActiveResponse ¶
type ListActiveResponse struct {
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
// contains filtered or unexported fields
}
func (*ListActiveResponse) Descriptor
deprecated
func (*ListActiveResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListActiveResponse.ProtoReflect.Descriptor instead.
func (*ListActiveResponse) GetUsers ¶
func (x *ListActiveResponse) GetUsers() []*User
func (*ListActiveResponse) ProtoMessage ¶
func (*ListActiveResponse) ProtoMessage()
func (*ListActiveResponse) ProtoReflect ¶
func (x *ListActiveResponse) ProtoReflect() protoreflect.Message
func (*ListActiveResponse) Reset ¶
func (x *ListActiveResponse) Reset()
func (*ListActiveResponse) String ¶
func (x *ListActiveResponse) String() string
type ListAllUserRequest ¶
type ListAllUserRequest struct {
// contains filtered or unexported fields
}
func (*ListAllUserRequest) Descriptor
deprecated
func (*ListAllUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListAllUserRequest.ProtoReflect.Descriptor instead.
func (*ListAllUserRequest) ProtoMessage ¶
func (*ListAllUserRequest) ProtoMessage()
func (*ListAllUserRequest) ProtoReflect ¶
func (x *ListAllUserRequest) ProtoReflect() protoreflect.Message
func (*ListAllUserRequest) Reset ¶
func (x *ListAllUserRequest) Reset()
func (*ListAllUserRequest) String ¶
func (x *ListAllUserRequest) String() string
type ListAllUserResponse ¶
type ListAllUserResponse struct {
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
// contains filtered or unexported fields
}
func (*ListAllUserResponse) Descriptor
deprecated
func (*ListAllUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListAllUserResponse.ProtoReflect.Descriptor instead.
func (*ListAllUserResponse) GetUsers ¶
func (x *ListAllUserResponse) GetUsers() []*User
func (*ListAllUserResponse) ProtoMessage ¶
func (*ListAllUserResponse) ProtoMessage()
func (*ListAllUserResponse) ProtoReflect ¶
func (x *ListAllUserResponse) ProtoReflect() protoreflect.Message
func (*ListAllUserResponse) Reset ¶
func (x *ListAllUserResponse) Reset()
func (*ListAllUserResponse) String ¶
func (x *ListAllUserResponse) String() string
type ListUserFilterByAgeNameRequest ¶
type ListUserFilterByAgeNameRequest struct {
Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
MinAge int32 `protobuf:"varint,3,opt,name=min_age,json=minAge,proto3" json:"min_age,omitempty"`
MaxAge int32 `protobuf:"varint,4,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"`
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*ListUserFilterByAgeNameRequest) Descriptor
deprecated
func (*ListUserFilterByAgeNameRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListUserFilterByAgeNameRequest.ProtoReflect.Descriptor instead.
func (*ListUserFilterByAgeNameRequest) GetLimit ¶
func (x *ListUserFilterByAgeNameRequest) GetLimit() int32
func (*ListUserFilterByAgeNameRequest) GetMaxAge ¶
func (x *ListUserFilterByAgeNameRequest) GetMaxAge() int32
func (*ListUserFilterByAgeNameRequest) GetMinAge ¶
func (x *ListUserFilterByAgeNameRequest) GetMinAge() int32
func (*ListUserFilterByAgeNameRequest) GetName ¶
func (x *ListUserFilterByAgeNameRequest) GetName() string
func (*ListUserFilterByAgeNameRequest) GetOffset ¶
func (x *ListUserFilterByAgeNameRequest) GetOffset() int32
func (*ListUserFilterByAgeNameRequest) ProtoMessage ¶
func (*ListUserFilterByAgeNameRequest) ProtoMessage()
func (*ListUserFilterByAgeNameRequest) ProtoReflect ¶
func (x *ListUserFilterByAgeNameRequest) ProtoReflect() protoreflect.Message
func (*ListUserFilterByAgeNameRequest) Reset ¶
func (x *ListUserFilterByAgeNameRequest) Reset()
func (*ListUserFilterByAgeNameRequest) String ¶
func (x *ListUserFilterByAgeNameRequest) String() string
type ListUserFilterByAgeNameResponse ¶
type ListUserFilterByAgeNameResponse struct {
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
// contains filtered or unexported fields
}
func (*ListUserFilterByAgeNameResponse) Descriptor
deprecated
func (*ListUserFilterByAgeNameResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListUserFilterByAgeNameResponse.ProtoReflect.Descriptor instead.
func (*ListUserFilterByAgeNameResponse) GetUsers ¶
func (x *ListUserFilterByAgeNameResponse) GetUsers() []*User
func (*ListUserFilterByAgeNameResponse) ProtoMessage ¶
func (*ListUserFilterByAgeNameResponse) ProtoMessage()
func (*ListUserFilterByAgeNameResponse) ProtoReflect ¶
func (x *ListUserFilterByAgeNameResponse) ProtoReflect() protoreflect.Message
func (*ListUserFilterByAgeNameResponse) Reset ¶
func (x *ListUserFilterByAgeNameResponse) Reset()
func (*ListUserFilterByAgeNameResponse) String ¶
func (x *ListUserFilterByAgeNameResponse) String() string
type UnimplementedUserServiceHandler ¶
type UnimplementedUserServiceHandler struct{}
UnimplementedUserServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedUserServiceHandler) Create ¶
func (UnimplementedUserServiceHandler) Create(context.Context, *connect.Request[CreateUserRequest]) (*connect.Response[User], error)
func (UnimplementedUserServiceHandler) CreateBulk ¶
func (UnimplementedUserServiceHandler) CreateBulk(context.Context, *connect.Request[CreateBulkUserRequest]) (*connect.Response[CreateBulkUserResponse], error)
func (UnimplementedUserServiceHandler) FilterByAgeName ¶
func (UnimplementedUserServiceHandler) FilterByAgeName(context.Context, *connect.Request[ListUserFilterByAgeNameRequest]) (*connect.Response[ListUserFilterByAgeNameResponse], error)
func (UnimplementedUserServiceHandler) GetByEmail ¶
func (UnimplementedUserServiceHandler) GetByEmail(context.Context, *connect.Request[GetUserByEmailRequest]) (*connect.Response[User], error)
func (UnimplementedUserServiceHandler) GetByID ¶
func (UnimplementedUserServiceHandler) GetByID(context.Context, *connect.Request[GetUserByIDRequest]) (*connect.Response[User], error)
func (UnimplementedUserServiceHandler) ListActive ¶
func (UnimplementedUserServiceHandler) ListActive(context.Context, *connect.Request[ListActiveRequest]) (*connect.Response[ListActiveResponse], error)
func (UnimplementedUserServiceHandler) ListAll ¶
func (UnimplementedUserServiceHandler) ListAll(context.Context, *connect.Request[ListAllUserRequest]) (*connect.Response[ListAllUserResponse], error)
type UpdateUserRequest ¶
type UpdateUserRequest struct {
ID int32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
// Full name, e.g. "Jane Doe"
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Age *int32 `protobuf:"varint,4,opt,name=age,proto3,oneof" json:"age,omitempty"`
Password *string `protobuf:"bytes,5,opt,name=password,proto3,oneof" json:"password,omitempty"`
IsActive *bool `protobuf:"varint,7,opt,name=is_active,json=isActive,proto3,oneof" json:"is_active,omitempty"`
LoginCount *int64 `protobuf:"varint,8,opt,name=login_count,json=loginCount,proto3,oneof" json:"login_count,omitempty"`
Rating *float64 `protobuf:"fixed64,9,opt,name=rating,proto3,oneof" json:"rating,omitempty"`
// UI preferences, e.g. {"theme":"dark"}
Preferences *string `protobuf:"bytes,10,opt,name=preferences,proto3,oneof" json:"preferences,omitempty"`
// contains filtered or unexported fields
}
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetAge ¶
func (x *UpdateUserRequest) GetAge() int32
func (*UpdateUserRequest) GetEmail ¶
func (x *UpdateUserRequest) GetEmail() string
func (*UpdateUserRequest) GetID ¶
func (x *UpdateUserRequest) GetID() int32
func (*UpdateUserRequest) GetIsActive ¶
func (x *UpdateUserRequest) GetIsActive() bool
func (*UpdateUserRequest) GetLoginCount ¶
func (x *UpdateUserRequest) GetLoginCount() int64
func (*UpdateUserRequest) GetName ¶
func (x *UpdateUserRequest) GetName() string
func (*UpdateUserRequest) GetPassword ¶
func (x *UpdateUserRequest) GetPassword() string
func (*UpdateUserRequest) GetPreferences ¶
func (x *UpdateUserRequest) GetPreferences() string
func (*UpdateUserRequest) GetRating ¶
func (x *UpdateUserRequest) GetRating() float64
func (*UpdateUserRequest) ProtoMessage ¶
func (*UpdateUserRequest) ProtoMessage()
func (*UpdateUserRequest) ProtoReflect ¶
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
func (*UpdateUserRequest) Reset ¶
func (x *UpdateUserRequest) Reset()
func (*UpdateUserRequest) String ¶
func (x *UpdateUserRequest) String() string
func (*UpdateUserRequest) Validate ¶
func (r *UpdateUserRequest) Validate() error
type User ¶
type User struct {
ID int32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
// Full name, e.g. "Jane Doe"
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Age *int32 `protobuf:"varint,4,opt,name=age,proto3,oneof" json:"age,omitempty"`
ApiKey []byte `protobuf:"bytes,6,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"`
IsActive bool `protobuf:"varint,7,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"`
LoginCount int64 `protobuf:"varint,8,opt,name=login_count,json=loginCount,proto3" json:"login_count,omitempty"`
Rating float64 `protobuf:"fixed64,9,opt,name=rating,proto3" json:"rating,omitempty"`
// UI preferences, e.g. {"theme":"dark"}
Preferences string `protobuf:"bytes,10,opt,name=preferences,proto3" json:"preferences,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
User represents as user entity
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetIsActive ¶
func (*User) GetLoginCount ¶
func (*User) GetPreferences ¶
func (*User) GetUpdatedAt ¶
func (x *User) GetUpdatedAt() *timestamppb.Timestamp
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface {
Create(context.Context, *connect.Request[CreateUserRequest]) (*connect.Response[User], error)
GetByID(context.Context, *connect.Request[GetUserByIDRequest]) (*connect.Response[User], error)
Update(context.Context, *connect.Request[UpdateUserRequest]) (*connect.Response[User], error)
Delete(context.Context, *connect.Request[DeleteUserRequest]) (*connect.Response[emptypb.Empty], error)
CreateBulk(context.Context, *connect.Request[CreateBulkUserRequest]) (*connect.Response[CreateBulkUserResponse], error)
GetByEmail(context.Context, *connect.Request[GetUserByEmailRequest]) (*connect.Response[User], error)
ListAll(context.Context, *connect.Request[ListAllUserRequest]) (*connect.Response[ListAllUserResponse], error)
DeleteAll(context.Context, *connect.Request[DeleteAllUserRequest]) (*connect.Response[emptypb.Empty], error)
ListActive(context.Context, *connect.Request[ListActiveRequest]) (*connect.Response[ListActiveResponse], error)
FilterByAgeName(context.Context, *connect.Request[ListUserFilterByAgeNameRequest]) (*connect.Response[ListUserFilterByAgeNameResponse], error)
}
UserServiceClient is a client for the entlite.UserService service.
func NewUserServiceClient ¶
func NewUserServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) UserServiceClient
NewUserServiceClient constructs a client for the entlite.UserService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type UserServiceHandler ¶
type UserServiceHandler interface {
Create(context.Context, *connect.Request[CreateUserRequest]) (*connect.Response[User], error)
GetByID(context.Context, *connect.Request[GetUserByIDRequest]) (*connect.Response[User], error)
Update(context.Context, *connect.Request[UpdateUserRequest]) (*connect.Response[User], error)
Delete(context.Context, *connect.Request[DeleteUserRequest]) (*connect.Response[emptypb.Empty], error)
CreateBulk(context.Context, *connect.Request[CreateBulkUserRequest]) (*connect.Response[CreateBulkUserResponse], error)
GetByEmail(context.Context, *connect.Request[GetUserByEmailRequest]) (*connect.Response[User], error)
ListAll(context.Context, *connect.Request[ListAllUserRequest]) (*connect.Response[ListAllUserResponse], error)
DeleteAll(context.Context, *connect.Request[DeleteAllUserRequest]) (*connect.Response[emptypb.Empty], error)
ListActive(context.Context, *connect.Request[ListActiveRequest]) (*connect.Response[ListActiveResponse], error)
FilterByAgeName(context.Context, *connect.Request[ListUserFilterByAgeNameRequest]) (*connect.Response[ListUserFilterByAgeNameResponse], error)
}
UserServiceHandler is an implementation of the entlite.UserService service.
type ValidateInterceptor ¶
type ValidateInterceptor struct{}
ValidateInterceptor calls the generated Validate() method on any request message that implements it
func NewValidateInterceptor ¶
func NewValidateInterceptor() *ValidateInterceptor
func (*ValidateInterceptor) WrapStreamingClient ¶
func (i *ValidateInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
WrapStreamingClient implements connect.Interceptor.
func (*ValidateInterceptor) WrapStreamingHandler ¶
func (i *ValidateInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
WrapStreamingHandler implements connect.Interceptor.