Documentation ¶
Index ¶
- Variables
- func RegisterWidgetsServer(s grpc.ServiceRegistrar, srv WidgetsServer)
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetName() string
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- func (m *CreateRequest) Validate() error
- func (m *CreateRequest) ValidateAll() error
- type CreateRequestMultiError
- type CreateRequestValidationError
- func (e CreateRequestValidationError) Cause() error
- func (e CreateRequestValidationError) Error() string
- func (e CreateRequestValidationError) ErrorName() string
- func (e CreateRequestValidationError) Field() string
- func (e CreateRequestValidationError) Key() bool
- func (e CreateRequestValidationError) Reason() string
- type DeleteRequest
- func (*DeleteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteRequest) GetUuid() string
- func (*DeleteRequest) ProtoMessage()
- func (x *DeleteRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteRequest) Reset()
- func (x *DeleteRequest) String() string
- func (m *DeleteRequest) Validate() error
- func (m *DeleteRequest) ValidateAll() error
- type DeleteRequestMultiError
- type DeleteRequestValidationError
- func (e DeleteRequestValidationError) Cause() error
- func (e DeleteRequestValidationError) Error() string
- func (e DeleteRequestValidationError) ErrorName() string
- func (e DeleteRequestValidationError) Field() string
- func (e DeleteRequestValidationError) Key() bool
- func (e DeleteRequestValidationError) Reason() string
- type FindRequest
- func (*FindRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FindRequest) GetUuid() string
- func (*FindRequest) ProtoMessage()
- func (x *FindRequest) ProtoReflect() protoreflect.Message
- func (x *FindRequest) Reset()
- func (x *FindRequest) String() string
- func (m *FindRequest) Validate() error
- func (m *FindRequest) ValidateAll() error
- type FindRequestMultiError
- type FindRequestValidationError
- func (e FindRequestValidationError) Cause() error
- func (e FindRequestValidationError) Error() string
- func (e FindRequestValidationError) ErrorName() string
- func (e FindRequestValidationError) Field() string
- func (e FindRequestValidationError) Key() bool
- func (e FindRequestValidationError) Reason() string
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetName() string
- func (x *ListRequest) GetOrderBy() ListRequest_OrderBy
- func (x *ListRequest) GetPageSize() int32
- func (x *ListRequest) GetPageToken() string
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- func (m *ListRequest) Validate() error
- func (m *ListRequest) ValidateAll() error
- type ListRequestMultiError
- type ListRequestValidationError
- func (e ListRequestValidationError) Cause() error
- func (e ListRequestValidationError) Error() string
- func (e ListRequestValidationError) ErrorName() string
- func (e ListRequestValidationError) Field() string
- func (e ListRequestValidationError) Key() bool
- func (e ListRequestValidationError) Reason() string
- type ListRequest_OrderBy
- func (ListRequest_OrderBy) Descriptor() protoreflect.EnumDescriptor
- func (x ListRequest_OrderBy) Enum() *ListRequest_OrderBy
- func (ListRequest_OrderBy) EnumDescriptor() ([]byte, []int)deprecated
- func (x ListRequest_OrderBy) Number() protoreflect.EnumNumber
- func (x ListRequest_OrderBy) String() string
- func (ListRequest_OrderBy) Type() protoreflect.EnumType
- type ListResponse
- func (*ListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResponse) GetNextPageToken() string
- func (x *ListResponse) GetWidgets() []*Widget
- func (*ListResponse) ProtoMessage()
- func (x *ListResponse) ProtoReflect() protoreflect.Message
- func (x *ListResponse) Reset()
- func (x *ListResponse) String() string
- func (m *ListResponse) Validate() error
- func (m *ListResponse) ValidateAll() error
- type ListResponseMultiError
- type ListResponseValidationError
- func (e ListResponseValidationError) Cause() error
- func (e ListResponseValidationError) Error() string
- func (e ListResponseValidationError) ErrorName() string
- func (e ListResponseValidationError) Field() string
- func (e ListResponseValidationError) Key() bool
- func (e ListResponseValidationError) Reason() string
- type UnimplementedWidgetsServer
- func (UnimplementedWidgetsServer) Create(context.Context, *CreateRequest) (*Widget, error)
- func (UnimplementedWidgetsServer) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
- func (UnimplementedWidgetsServer) FindByID(context.Context, *FindRequest) (*Widget, error)
- func (UnimplementedWidgetsServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedWidgetsServer) Update(context.Context, *UpdateRequest) (*Widget, error)
- type UnsafeWidgetsServer
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetMask() *fieldmaskpb.FieldMask
- func (x *UpdateRequest) GetUuid() string
- func (x *UpdateRequest) GetWidget() *Widget
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- func (m *UpdateRequest) Validate() error
- func (m *UpdateRequest) ValidateAll() error
- type UpdateRequestMultiError
- type UpdateRequestValidationError
- func (e UpdateRequestValidationError) Cause() error
- func (e UpdateRequestValidationError) Error() string
- func (e UpdateRequestValidationError) ErrorName() string
- func (e UpdateRequestValidationError) Field() string
- func (e UpdateRequestValidationError) Key() bool
- func (e UpdateRequestValidationError) Reason() string
- type Widget
- func (*Widget) Descriptor() ([]byte, []int)deprecated
- func (x *Widget) GetName() string
- func (x *Widget) GetUuid() string
- func (*Widget) ProtoMessage()
- func (x *Widget) ProtoReflect() protoreflect.Message
- func (x *Widget) Reset()
- func (x *Widget) String() string
- func (m *Widget) Validate() error
- func (m *Widget) ValidateAll() error
- type WidgetExternal
- type WidgetMultiError
- type WidgetValidationError
- type WidgetsClient
- type WidgetsServer
Constants ¶
This section is empty.
Variables ¶
var ( ListRequest_OrderBy_name = map[int32]string{ 0: "DEFAULT", 1: "NAME", } ListRequest_OrderBy_value = map[string]int32{ "DEFAULT": 0, "NAME": 1, } )
Enum value maps for ListRequest_OrderBy.
var File_pkg_apis_widgets_widgets_proto protoreflect.FileDescriptor
var Widgets_ServiceDesc = grpc.ServiceDesc{ ServiceName: "widgetsAPI.Widgets", HandlerType: (*WidgetsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Widgets_Create_Handler, }, { MethodName: "FindByID", Handler: _Widgets_FindByID_Handler, }, { MethodName: "List", Handler: _Widgets_List_Handler, }, { MethodName: "Update", Handler: _Widgets_Update_Handler, }, { MethodName: "Delete", Handler: _Widgets_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/apis/widgets/widgets.proto", }
Widgets_ServiceDesc is the grpc.ServiceDesc for Widgets service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterWidgetsServer ¶
func RegisterWidgetsServer(s grpc.ServiceRegistrar, srv WidgetsServer)
Types ¶
type CreateRequest ¶
type CreateRequest struct { // user friendly name Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetName ¶
func (x *CreateRequest) GetName() string
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
func (*CreateRequest) Validate ¶
func (m *CreateRequest) Validate() error
Validate checks the field values on CreateRequest 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 (*CreateRequest) ValidateAll ¶
func (m *CreateRequest) ValidateAll() error
ValidateAll checks the field values on CreateRequest 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 CreateRequestMultiError, or nil if none found.
type CreateRequestMultiError ¶
type CreateRequestMultiError []error
CreateRequestMultiError is an error wrapping multiple validation errors returned by CreateRequest.ValidateAll() if the designated constraints aren't met.
func (CreateRequestMultiError) AllErrors ¶
func (m CreateRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateRequestMultiError) Error ¶
func (m CreateRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateRequestValidationError ¶
type CreateRequestValidationError struct {
// contains filtered or unexported fields
}
CreateRequestValidationError is the validation error returned by CreateRequest.Validate if the designated constraints aren't met.
func (CreateRequestValidationError) Cause ¶
func (e CreateRequestValidationError) Cause() error
Cause function returns cause value.
func (CreateRequestValidationError) Error ¶
func (e CreateRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreateRequestValidationError) ErrorName ¶
func (e CreateRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreateRequestValidationError) Field ¶
func (e CreateRequestValidationError) Field() string
Field function returns field value.
func (CreateRequestValidationError) Key ¶
func (e CreateRequestValidationError) Key() bool
Key function returns key value.
func (CreateRequestValidationError) Reason ¶
func (e CreateRequestValidationError) Reason() string
Reason function returns reason value.
type DeleteRequest ¶
type DeleteRequest struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetUuid ¶
func (x *DeleteRequest) GetUuid() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
func (*DeleteRequest) Validate ¶
func (m *DeleteRequest) Validate() error
Validate checks the field values on DeleteRequest 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 (*DeleteRequest) ValidateAll ¶
func (m *DeleteRequest) ValidateAll() error
ValidateAll checks the field values on DeleteRequest 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 DeleteRequestMultiError, or nil if none found.
type DeleteRequestMultiError ¶
type DeleteRequestMultiError []error
DeleteRequestMultiError is an error wrapping multiple validation errors returned by DeleteRequest.ValidateAll() if the designated constraints aren't met.
func (DeleteRequestMultiError) AllErrors ¶
func (m DeleteRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteRequestMultiError) Error ¶
func (m DeleteRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteRequestValidationError ¶
type DeleteRequestValidationError struct {
// contains filtered or unexported fields
}
DeleteRequestValidationError is the validation error returned by DeleteRequest.Validate if the designated constraints aren't met.
func (DeleteRequestValidationError) Cause ¶
func (e DeleteRequestValidationError) Cause() error
Cause function returns cause value.
func (DeleteRequestValidationError) Error ¶
func (e DeleteRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteRequestValidationError) ErrorName ¶
func (e DeleteRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteRequestValidationError) Field ¶
func (e DeleteRequestValidationError) Field() string
Field function returns field value.
func (DeleteRequestValidationError) Key ¶
func (e DeleteRequestValidationError) Key() bool
Key function returns key value.
func (DeleteRequestValidationError) Reason ¶
func (e DeleteRequestValidationError) Reason() string
Reason function returns reason value.
type FindRequest ¶
type FindRequest struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // contains filtered or unexported fields }
func (*FindRequest) Descriptor
deprecated
func (*FindRequest) Descriptor() ([]byte, []int)
Deprecated: Use FindRequest.ProtoReflect.Descriptor instead.
func (*FindRequest) GetUuid ¶
func (x *FindRequest) GetUuid() string
func (*FindRequest) ProtoMessage ¶
func (*FindRequest) ProtoMessage()
func (*FindRequest) ProtoReflect ¶
func (x *FindRequest) ProtoReflect() protoreflect.Message
func (*FindRequest) Reset ¶
func (x *FindRequest) Reset()
func (*FindRequest) String ¶
func (x *FindRequest) String() string
func (*FindRequest) Validate ¶
func (m *FindRequest) Validate() error
Validate checks the field values on FindRequest 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 (*FindRequest) ValidateAll ¶
func (m *FindRequest) ValidateAll() error
ValidateAll checks the field values on FindRequest 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 FindRequestMultiError, or nil if none found.
type FindRequestMultiError ¶
type FindRequestMultiError []error
FindRequestMultiError is an error wrapping multiple validation errors returned by FindRequest.ValidateAll() if the designated constraints aren't met.
func (FindRequestMultiError) AllErrors ¶
func (m FindRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FindRequestMultiError) Error ¶
func (m FindRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FindRequestValidationError ¶
type FindRequestValidationError struct {
// contains filtered or unexported fields
}
FindRequestValidationError is the validation error returned by FindRequest.Validate if the designated constraints aren't met.
func (FindRequestValidationError) Cause ¶
func (e FindRequestValidationError) Cause() error
Cause function returns cause value.
func (FindRequestValidationError) Error ¶
func (e FindRequestValidationError) Error() string
Error satisfies the builtin error interface
func (FindRequestValidationError) ErrorName ¶
func (e FindRequestValidationError) ErrorName() string
ErrorName returns error name.
func (FindRequestValidationError) Field ¶
func (e FindRequestValidationError) Field() string
Field function returns field value.
func (FindRequestValidationError) Key ¶
func (e FindRequestValidationError) Key() bool
Key function returns key value.
func (FindRequestValidationError) Reason ¶
func (e FindRequestValidationError) Reason() string
Reason function returns reason value.
type ListRequest ¶
type ListRequest struct { // Specify the sort order for the results. OrderBy ListRequest_OrderBy `protobuf:"varint,1,opt,name=order_by,json=orderBy,proto3,enum=widgetsAPI.ListRequest_OrderBy" json:"order_by,omitempty"` // Maximum entries per page PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // The next_page_token returned from a previous list request if any. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // Further fields are bound to query parameters and act to filter the result Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetName ¶
func (x *ListRequest) GetName() string
func (*ListRequest) GetOrderBy ¶
func (x *ListRequest) GetOrderBy() ListRequest_OrderBy
func (*ListRequest) GetPageSize ¶
func (x *ListRequest) GetPageSize() int32
func (*ListRequest) GetPageToken ¶
func (x *ListRequest) GetPageToken() string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
func (*ListRequest) Validate ¶
func (m *ListRequest) Validate() error
Validate checks the field values on ListRequest 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 (*ListRequest) ValidateAll ¶
func (m *ListRequest) ValidateAll() error
ValidateAll checks the field values on ListRequest 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 ListRequestMultiError, or nil if none found.
type ListRequestMultiError ¶
type ListRequestMultiError []error
ListRequestMultiError is an error wrapping multiple validation errors returned by ListRequest.ValidateAll() if the designated constraints aren't met.
func (ListRequestMultiError) AllErrors ¶
func (m ListRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListRequestMultiError) Error ¶
func (m ListRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListRequestValidationError ¶
type ListRequestValidationError struct {
// contains filtered or unexported fields
}
ListRequestValidationError is the validation error returned by ListRequest.Validate if the designated constraints aren't met.
func (ListRequestValidationError) Cause ¶
func (e ListRequestValidationError) Cause() error
Cause function returns cause value.
func (ListRequestValidationError) Error ¶
func (e ListRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListRequestValidationError) ErrorName ¶
func (e ListRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListRequestValidationError) Field ¶
func (e ListRequestValidationError) Field() string
Field function returns field value.
func (ListRequestValidationError) Key ¶
func (e ListRequestValidationError) Key() bool
Key function returns key value.
func (ListRequestValidationError) Reason ¶
func (e ListRequestValidationError) Reason() string
Reason function returns reason value.
type ListRequest_OrderBy ¶
type ListRequest_OrderBy int32
Supported sort orders
const ( ListRequest_DEFAULT ListRequest_OrderBy = 0 ListRequest_NAME ListRequest_OrderBy = 1 )
func (ListRequest_OrderBy) Descriptor ¶
func (ListRequest_OrderBy) Descriptor() protoreflect.EnumDescriptor
func (ListRequest_OrderBy) Enum ¶
func (x ListRequest_OrderBy) Enum() *ListRequest_OrderBy
func (ListRequest_OrderBy) EnumDescriptor
deprecated
func (ListRequest_OrderBy) EnumDescriptor() ([]byte, []int)
Deprecated: Use ListRequest_OrderBy.Descriptor instead.
func (ListRequest_OrderBy) Number ¶
func (x ListRequest_OrderBy) Number() protoreflect.EnumNumber
func (ListRequest_OrderBy) String ¶
func (x ListRequest_OrderBy) String() string
func (ListRequest_OrderBy) Type ¶
func (ListRequest_OrderBy) Type() protoreflect.EnumType
type ListResponse ¶
type ListResponse struct { Widgets []*Widget `protobuf:"bytes,1,rep,name=widgets,proto3" json:"widgets,omitempty"` // Token to retrieve the next page of results or empty if there are none. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetNextPageToken ¶
func (x *ListResponse) GetNextPageToken() string
func (*ListResponse) GetWidgets ¶
func (x *ListResponse) GetWidgets() []*Widget
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
func (*ListResponse) Validate ¶
func (m *ListResponse) Validate() error
Validate checks the field values on ListResponse 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 (*ListResponse) ValidateAll ¶
func (m *ListResponse) ValidateAll() error
ValidateAll checks the field values on ListResponse 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 ListResponseMultiError, or nil if none found.
type ListResponseMultiError ¶
type ListResponseMultiError []error
ListResponseMultiError is an error wrapping multiple validation errors returned by ListResponse.ValidateAll() if the designated constraints aren't met.
func (ListResponseMultiError) AllErrors ¶
func (m ListResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListResponseMultiError) Error ¶
func (m ListResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListResponseValidationError ¶
type ListResponseValidationError struct {
// contains filtered or unexported fields
}
ListResponseValidationError is the validation error returned by ListResponse.Validate if the designated constraints aren't met.
func (ListResponseValidationError) Cause ¶
func (e ListResponseValidationError) Cause() error
Cause function returns cause value.
func (ListResponseValidationError) Error ¶
func (e ListResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListResponseValidationError) ErrorName ¶
func (e ListResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListResponseValidationError) Field ¶
func (e ListResponseValidationError) Field() string
Field function returns field value.
func (ListResponseValidationError) Key ¶
func (e ListResponseValidationError) Key() bool
Key function returns key value.
func (ListResponseValidationError) Reason ¶
func (e ListResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedWidgetsServer ¶
type UnimplementedWidgetsServer struct { }
UnimplementedWidgetsServer must be embedded to have forward compatible implementations.
func (UnimplementedWidgetsServer) Create ¶
func (UnimplementedWidgetsServer) Create(context.Context, *CreateRequest) (*Widget, error)
func (UnimplementedWidgetsServer) Delete ¶
func (UnimplementedWidgetsServer) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
func (UnimplementedWidgetsServer) FindByID ¶
func (UnimplementedWidgetsServer) FindByID(context.Context, *FindRequest) (*Widget, error)
func (UnimplementedWidgetsServer) List ¶
func (UnimplementedWidgetsServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedWidgetsServer) Update ¶
func (UnimplementedWidgetsServer) Update(context.Context, *UpdateRequest) (*Widget, error)
type UnsafeWidgetsServer ¶
type UnsafeWidgetsServer interface {
// contains filtered or unexported methods
}
UnsafeWidgetsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WidgetsServer will result in compilation errors.
type UpdateRequest ¶
type UpdateRequest struct { // Unique identity of widget. Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Widget *Widget `protobuf:"bytes,2,opt,name=widget,proto3" json:"widget,omitempty"` // The mask says exactly which fields are to be updated. This // removes the ambiguity caused by 'zero' valued fields. Mask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=mask,proto3" json:"mask,omitempty"` // contains filtered or unexported fields }
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetMask ¶
func (x *UpdateRequest) GetMask() *fieldmaskpb.FieldMask
func (*UpdateRequest) GetUuid ¶
func (x *UpdateRequest) GetUuid() string
func (*UpdateRequest) GetWidget ¶
func (x *UpdateRequest) GetWidget() *Widget
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
func (*UpdateRequest) Validate ¶
func (m *UpdateRequest) Validate() error
Validate checks the field values on UpdateRequest 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 (*UpdateRequest) ValidateAll ¶
func (m *UpdateRequest) ValidateAll() error
ValidateAll checks the field values on UpdateRequest 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 UpdateRequestMultiError, or nil if none found.
type UpdateRequestMultiError ¶
type UpdateRequestMultiError []error
UpdateRequestMultiError is an error wrapping multiple validation errors returned by UpdateRequest.ValidateAll() if the designated constraints aren't met.
func (UpdateRequestMultiError) AllErrors ¶
func (m UpdateRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateRequestMultiError) Error ¶
func (m UpdateRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateRequestValidationError ¶
type UpdateRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateRequestValidationError is the validation error returned by UpdateRequest.Validate if the designated constraints aren't met.
func (UpdateRequestValidationError) Cause ¶
func (e UpdateRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateRequestValidationError) Error ¶
func (e UpdateRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateRequestValidationError) ErrorName ¶
func (e UpdateRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateRequestValidationError) Field ¶
func (e UpdateRequestValidationError) Field() string
Field function returns field value.
func (UpdateRequestValidationError) Key ¶
func (e UpdateRequestValidationError) Key() bool
Key function returns key value.
func (UpdateRequestValidationError) Reason ¶
func (e UpdateRequestValidationError) Reason() string
Reason function returns reason value.
type Widget ¶
type Widget struct { // generated uuid Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // user friendly name Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func WidgetFromExternal ¶
func WidgetFromExternal(w *WidgetExternal) Widget
WidgetFromExternal creates a prto message from a vanilla copy of the widgets record.
func (*Widget) Descriptor
deprecated
func (*Widget) ProtoMessage ¶
func (*Widget) ProtoMessage()
func (*Widget) ProtoReflect ¶
func (x *Widget) ProtoReflect() protoreflect.Message
func (*Widget) Validate ¶
Validate checks the field values on Widget 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 (*Widget) ValidateAll ¶
ValidateAll checks the field values on Widget 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 WidgetMultiError, or nil if none found.
type WidgetExternal ¶
type WidgetExternal struct { Uuid string `json:"uuid,omitempty"` Name string `json:"name,omitempty"` }
External version of Widget struct without the proto overhead. This struct must be kept in synchronization with the proto message.
func WidgetToExternal ¶
func WidgetToExternal(w *Widget) WidgetExternal
WidgetToExternal creates and external representation of the proto message without the proto members.
type WidgetMultiError ¶
type WidgetMultiError []error
WidgetMultiError is an error wrapping multiple validation errors returned by Widget.ValidateAll() if the designated constraints aren't met.
func (WidgetMultiError) AllErrors ¶
func (m WidgetMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (WidgetMultiError) Error ¶
func (m WidgetMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type WidgetValidationError ¶
type WidgetValidationError struct {
// contains filtered or unexported fields
}
WidgetValidationError is the validation error returned by Widget.Validate if the designated constraints aren't met.
func (WidgetValidationError) Cause ¶
func (e WidgetValidationError) Cause() error
Cause function returns cause value.
func (WidgetValidationError) Error ¶
func (e WidgetValidationError) Error() string
Error satisfies the builtin error interface
func (WidgetValidationError) ErrorName ¶
func (e WidgetValidationError) ErrorName() string
ErrorName returns error name.
func (WidgetValidationError) Field ¶
func (e WidgetValidationError) Field() string
Field function returns field value.
func (WidgetValidationError) Key ¶
func (e WidgetValidationError) Key() bool
Key function returns key value.
func (WidgetValidationError) Reason ¶
func (e WidgetValidationError) Reason() string
Reason function returns reason value.
type WidgetsClient ¶
type WidgetsClient interface { // // create a widget Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*Widget, error) // // returns specific widget FindByID(ctx context.Context, in *FindRequest, opts ...grpc.CallOption) (*Widget, error) // // returns list of all widgets List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) // // update a widget Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*Widget, error) // // delete a widget Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
WidgetsClient is the client API for Widgets 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 NewWidgetsClient ¶
func NewWidgetsClient(cc grpc.ClientConnInterface) WidgetsClient
type WidgetsServer ¶
type WidgetsServer interface { // // create a widget Create(context.Context, *CreateRequest) (*Widget, error) // // returns specific widget FindByID(context.Context, *FindRequest) (*Widget, error) // // returns list of all widgets List(context.Context, *ListRequest) (*ListResponse, error) // // update a widget Update(context.Context, *UpdateRequest) (*Widget, error) // // delete a widget Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
WidgetsServer is the server API for Widgets service. All implementations must embed UnimplementedWidgetsServer for forward compatibility