Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAdsServiceServer(s grpc.ServiceRegistrar, srv AdsServiceServer)
- func RegisterInternetServiceServer(s grpc.ServiceRegistrar, srv InternetServiceServer)
- type AdsServiceClient
- type AdsServiceServer
- type GetAdsRequest
- func (*GetAdsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAdsRequest) GetAdType() internet.AdType
- func (x *GetAdsRequest) GetCount() int32
- func (*GetAdsRequest) ProtoMessage()
- func (x *GetAdsRequest) ProtoReflect() protoreflect.Message
- func (x *GetAdsRequest) Reset()
- func (m *GetAdsRequest) Sanitize() error
- func (x *GetAdsRequest) String() string
- func (m *GetAdsRequest) Validate() error
- func (m *GetAdsRequest) ValidateAll() error
- type GetAdsRequestMultiError
- type GetAdsRequestValidationError
- func (e GetAdsRequestValidationError) Cause() error
- func (e GetAdsRequestValidationError) Error() string
- func (e GetAdsRequestValidationError) ErrorName() string
- func (e GetAdsRequestValidationError) Field() string
- func (e GetAdsRequestValidationError) Key() bool
- func (e GetAdsRequestValidationError) Reason() string
- type GetAdsResponse
- func (*GetAdsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAdsResponse) GetAds() []*internet.Ad
- func (*GetAdsResponse) ProtoMessage()
- func (x *GetAdsResponse) ProtoReflect() protoreflect.Message
- func (x *GetAdsResponse) Reset()
- func (m *GetAdsResponse) Sanitize() error
- func (x *GetAdsResponse) String() string
- func (m *GetAdsResponse) Validate() error
- func (m *GetAdsResponse) ValidateAll() error
- type GetAdsResponseMultiError
- type GetAdsResponseValidationError
- func (e GetAdsResponseValidationError) Cause() error
- func (e GetAdsResponseValidationError) Error() string
- func (e GetAdsResponseValidationError) ErrorName() string
- func (e GetAdsResponseValidationError) Field() string
- func (e GetAdsResponseValidationError) Key() bool
- func (e GetAdsResponseValidationError) Reason() string
- type GetPageRequest
- func (*GetPageRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetPageRequest) GetDomain() string
- func (x *GetPageRequest) GetPath() string
- func (*GetPageRequest) ProtoMessage()
- func (x *GetPageRequest) ProtoReflect() protoreflect.Message
- func (x *GetPageRequest) Reset()
- func (m *GetPageRequest) Sanitize() error
- func (x *GetPageRequest) String() string
- func (m *GetPageRequest) Validate() error
- func (m *GetPageRequest) ValidateAll() error
- type GetPageRequestMultiError
- type GetPageRequestValidationError
- func (e GetPageRequestValidationError) Cause() error
- func (e GetPageRequestValidationError) Error() string
- func (e GetPageRequestValidationError) ErrorName() string
- func (e GetPageRequestValidationError) Field() string
- func (e GetPageRequestValidationError) Key() bool
- func (e GetPageRequestValidationError) Reason() string
- type GetPageResponse
- func (*GetPageResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPageResponse) GetPage() *internet.Page
- func (*GetPageResponse) ProtoMessage()
- func (x *GetPageResponse) ProtoReflect() protoreflect.Message
- func (x *GetPageResponse) Reset()
- func (m *GetPageResponse) Sanitize() error
- func (x *GetPageResponse) String() string
- func (m *GetPageResponse) Validate() error
- func (m *GetPageResponse) ValidateAll() error
- type GetPageResponseMultiError
- type GetPageResponseValidationError
- func (e GetPageResponseValidationError) Cause() error
- func (e GetPageResponseValidationError) Error() string
- func (e GetPageResponseValidationError) ErrorName() string
- func (e GetPageResponseValidationError) Field() string
- func (e GetPageResponseValidationError) Key() bool
- func (e GetPageResponseValidationError) Reason() string
- type InternetServiceClient
- type InternetServiceServer
- type Params
- type SearchRequest
- func (*SearchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SearchRequest) GetSearch() string
- func (*SearchRequest) ProtoMessage()
- func (x *SearchRequest) ProtoReflect() protoreflect.Message
- func (x *SearchRequest) Reset()
- func (m *SearchRequest) Sanitize() error
- func (x *SearchRequest) String() string
- func (m *SearchRequest) Validate() error
- func (m *SearchRequest) ValidateAll() error
- type SearchRequestMultiError
- type SearchRequestValidationError
- func (e SearchRequestValidationError) Cause() error
- func (e SearchRequestValidationError) Error() string
- func (e SearchRequestValidationError) ErrorName() string
- func (e SearchRequestValidationError) Field() string
- func (e SearchRequestValidationError) Key() bool
- func (e SearchRequestValidationError) Reason() string
- type SearchResponse
- func (*SearchResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SearchResponse) GetResults() []*internet.SearchResult
- func (*SearchResponse) ProtoMessage()
- func (x *SearchResponse) ProtoReflect() protoreflect.Message
- func (x *SearchResponse) Reset()
- func (m *SearchResponse) Sanitize() error
- func (x *SearchResponse) String() string
- func (m *SearchResponse) Validate() error
- func (m *SearchResponse) ValidateAll() error
- type SearchResponseMultiError
- type SearchResponseValidationError
- func (e SearchResponseValidationError) Cause() error
- func (e SearchResponseValidationError) Error() string
- func (e SearchResponseValidationError) ErrorName() string
- func (e SearchResponseValidationError) Field() string
- func (e SearchResponseValidationError) Key() bool
- func (e SearchResponseValidationError) Reason() string
- type Server
- func (s *Server) GetAds(ctx context.Context, req *GetAdsRequest) (*GetAdsResponse, error)
- func (s *Server) GetPage(ctx context.Context, req *GetPageRequest) (*GetPageResponse, error)
- func (s *Server) GetPermsRemap() map[string]string
- func (s *Server) RegisterServer(srv *grpc.Server)
- func (s *Server) Search(ctx context.Context, req *SearchRequest) (*SearchResponse, error)
- type UnimplementedAdsServiceServer
- type UnimplementedInternetServiceServer
- type UnsafeAdsServiceServer
- type UnsafeInternetServiceServer
Constants ¶
const ( InternetService_Search_FullMethodName = "/services.internet.InternetService/Search" InternetService_GetPage_FullMethodName = "/services.internet.InternetService/GetPage" )
const (
AdsService_GetAds_FullMethodName = "/services.internet.AdsService/GetAds"
)
Variables ¶
var AdsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "services.internet.AdsService", HandlerType: (*AdsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAds", Handler: _AdsService_GetAds_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "services/internet/ads.proto", }
AdsService_ServiceDesc is the grpc.ServiceDesc for AdsService 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_internet_ads_proto protoreflect.FileDescriptor
var File_services_internet_internet_proto protoreflect.FileDescriptor
var InternetService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "services.internet.InternetService", HandlerType: (*InternetServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Search", Handler: _InternetService_Search_Handler, }, { MethodName: "GetPage", Handler: _InternetService_GetPage_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "services/internet/internet.proto", }
InternetService_ServiceDesc is the grpc.ServiceDesc for InternetService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var PermsRemap = map[string]string{
"AdsService/GetAds": "Any",
"InternetService/GetPage": "Any",
"InternetService/Search": "Any",
}
Functions ¶
func RegisterAdsServiceServer ¶
func RegisterAdsServiceServer(s grpc.ServiceRegistrar, srv AdsServiceServer)
func RegisterInternetServiceServer ¶
func RegisterInternetServiceServer(s grpc.ServiceRegistrar, srv InternetServiceServer)
Types ¶
type AdsServiceClient ¶
type AdsServiceClient interface { // @perm: Name=Any GetAds(ctx context.Context, in *GetAdsRequest, opts ...grpc.CallOption) (*GetAdsResponse, error) }
AdsServiceClient is the client API for AdsService 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 NewAdsServiceClient ¶
func NewAdsServiceClient(cc grpc.ClientConnInterface) AdsServiceClient
func NewTestAdsServiceClient ¶
func NewTestAdsServiceClient(srv AdsServiceServer) (AdsServiceClient, context.Context, context.CancelFunc)
type AdsServiceServer ¶
type AdsServiceServer interface { // @perm: Name=Any GetAds(context.Context, *GetAdsRequest) (*GetAdsResponse, error) // contains filtered or unexported methods }
AdsServiceServer is the server API for AdsService service. All implementations must embed UnimplementedAdsServiceServer for forward compatibility
type GetAdsRequest ¶
type GetAdsRequest struct { AdType internet.AdType `protobuf:"varint,1,opt,name=ad_type,json=adType,proto3,enum=resources.internet.AdType" json:"ad_type,omitempty"` Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*GetAdsRequest) Descriptor
deprecated
func (*GetAdsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAdsRequest.ProtoReflect.Descriptor instead.
func (*GetAdsRequest) GetAdType ¶
func (x *GetAdsRequest) GetAdType() internet.AdType
func (*GetAdsRequest) GetCount ¶
func (x *GetAdsRequest) GetCount() int32
func (*GetAdsRequest) ProtoMessage ¶
func (*GetAdsRequest) ProtoMessage()
func (*GetAdsRequest) ProtoReflect ¶
func (x *GetAdsRequest) ProtoReflect() protoreflect.Message
func (*GetAdsRequest) Reset ¶
func (x *GetAdsRequest) Reset()
func (*GetAdsRequest) Sanitize ¶
func (m *GetAdsRequest) Sanitize() error
func (*GetAdsRequest) String ¶
func (x *GetAdsRequest) String() string
func (*GetAdsRequest) Validate ¶
func (m *GetAdsRequest) Validate() error
Validate checks the field values on GetAdsRequest 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 (*GetAdsRequest) ValidateAll ¶
func (m *GetAdsRequest) ValidateAll() error
ValidateAll checks the field values on GetAdsRequest 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 GetAdsRequestMultiError, or nil if none found.
type GetAdsRequestMultiError ¶
type GetAdsRequestMultiError []error
GetAdsRequestMultiError is an error wrapping multiple validation errors returned by GetAdsRequest.ValidateAll() if the designated constraints aren't met.
func (GetAdsRequestMultiError) AllErrors ¶
func (m GetAdsRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetAdsRequestMultiError) Error ¶
func (m GetAdsRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetAdsRequestValidationError ¶
type GetAdsRequestValidationError struct {
// contains filtered or unexported fields
}
GetAdsRequestValidationError is the validation error returned by GetAdsRequest.Validate if the designated constraints aren't met.
func (GetAdsRequestValidationError) Cause ¶
func (e GetAdsRequestValidationError) Cause() error
Cause function returns cause value.
func (GetAdsRequestValidationError) Error ¶
func (e GetAdsRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetAdsRequestValidationError) ErrorName ¶
func (e GetAdsRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetAdsRequestValidationError) Field ¶
func (e GetAdsRequestValidationError) Field() string
Field function returns field value.
func (GetAdsRequestValidationError) Key ¶
func (e GetAdsRequestValidationError) Key() bool
Key function returns key value.
func (GetAdsRequestValidationError) Reason ¶
func (e GetAdsRequestValidationError) Reason() string
Reason function returns reason value.
type GetAdsResponse ¶
type GetAdsResponse struct { Ads []*internet.Ad `protobuf:"bytes,1,rep,name=ads,proto3" json:"ads,omitempty"` // contains filtered or unexported fields }
func (*GetAdsResponse) Descriptor
deprecated
func (*GetAdsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAdsResponse.ProtoReflect.Descriptor instead.
func (*GetAdsResponse) GetAds ¶
func (x *GetAdsResponse) GetAds() []*internet.Ad
func (*GetAdsResponse) ProtoMessage ¶
func (*GetAdsResponse) ProtoMessage()
func (*GetAdsResponse) ProtoReflect ¶
func (x *GetAdsResponse) ProtoReflect() protoreflect.Message
func (*GetAdsResponse) Reset ¶
func (x *GetAdsResponse) Reset()
func (*GetAdsResponse) Sanitize ¶
func (m *GetAdsResponse) Sanitize() error
func (*GetAdsResponse) String ¶
func (x *GetAdsResponse) String() string
func (*GetAdsResponse) Validate ¶
func (m *GetAdsResponse) Validate() error
Validate checks the field values on GetAdsResponse 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 (*GetAdsResponse) ValidateAll ¶
func (m *GetAdsResponse) ValidateAll() error
ValidateAll checks the field values on GetAdsResponse 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 GetAdsResponseMultiError, or nil if none found.
type GetAdsResponseMultiError ¶
type GetAdsResponseMultiError []error
GetAdsResponseMultiError is an error wrapping multiple validation errors returned by GetAdsResponse.ValidateAll() if the designated constraints aren't met.
func (GetAdsResponseMultiError) AllErrors ¶
func (m GetAdsResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetAdsResponseMultiError) Error ¶
func (m GetAdsResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetAdsResponseValidationError ¶
type GetAdsResponseValidationError struct {
// contains filtered or unexported fields
}
GetAdsResponseValidationError is the validation error returned by GetAdsResponse.Validate if the designated constraints aren't met.
func (GetAdsResponseValidationError) Cause ¶
func (e GetAdsResponseValidationError) Cause() error
Cause function returns cause value.
func (GetAdsResponseValidationError) Error ¶
func (e GetAdsResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetAdsResponseValidationError) ErrorName ¶
func (e GetAdsResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetAdsResponseValidationError) Field ¶
func (e GetAdsResponseValidationError) Field() string
Field function returns field value.
func (GetAdsResponseValidationError) Key ¶
func (e GetAdsResponseValidationError) Key() bool
Key function returns key value.
func (GetAdsResponseValidationError) Reason ¶
func (e GetAdsResponseValidationError) Reason() string
Reason function returns reason value.
type GetPageRequest ¶
type GetPageRequest struct { Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // contains filtered or unexported fields }
func (*GetPageRequest) Descriptor
deprecated
func (*GetPageRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPageRequest.ProtoReflect.Descriptor instead.
func (*GetPageRequest) GetDomain ¶
func (x *GetPageRequest) GetDomain() string
func (*GetPageRequest) GetPath ¶
func (x *GetPageRequest) GetPath() string
func (*GetPageRequest) ProtoMessage ¶
func (*GetPageRequest) ProtoMessage()
func (*GetPageRequest) ProtoReflect ¶
func (x *GetPageRequest) ProtoReflect() protoreflect.Message
func (*GetPageRequest) Reset ¶
func (x *GetPageRequest) Reset()
func (*GetPageRequest) Sanitize ¶
func (m *GetPageRequest) Sanitize() error
func (*GetPageRequest) String ¶
func (x *GetPageRequest) String() string
func (*GetPageRequest) Validate ¶
func (m *GetPageRequest) Validate() error
Validate checks the field values on GetPageRequest 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 (*GetPageRequest) ValidateAll ¶
func (m *GetPageRequest) ValidateAll() error
ValidateAll checks the field values on GetPageRequest 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 GetPageRequestMultiError, or nil if none found.
type GetPageRequestMultiError ¶
type GetPageRequestMultiError []error
GetPageRequestMultiError is an error wrapping multiple validation errors returned by GetPageRequest.ValidateAll() if the designated constraints aren't met.
func (GetPageRequestMultiError) AllErrors ¶
func (m GetPageRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetPageRequestMultiError) Error ¶
func (m GetPageRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetPageRequestValidationError ¶
type GetPageRequestValidationError struct {
// contains filtered or unexported fields
}
GetPageRequestValidationError is the validation error returned by GetPageRequest.Validate if the designated constraints aren't met.
func (GetPageRequestValidationError) Cause ¶
func (e GetPageRequestValidationError) Cause() error
Cause function returns cause value.
func (GetPageRequestValidationError) Error ¶
func (e GetPageRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetPageRequestValidationError) ErrorName ¶
func (e GetPageRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetPageRequestValidationError) Field ¶
func (e GetPageRequestValidationError) Field() string
Field function returns field value.
func (GetPageRequestValidationError) Key ¶
func (e GetPageRequestValidationError) Key() bool
Key function returns key value.
func (GetPageRequestValidationError) Reason ¶
func (e GetPageRequestValidationError) Reason() string
Reason function returns reason value.
type GetPageResponse ¶
type GetPageResponse struct { Page *internet.Page `protobuf:"bytes,1,opt,name=page,proto3,oneof" json:"page,omitempty"` // contains filtered or unexported fields }
func (*GetPageResponse) Descriptor
deprecated
func (*GetPageResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPageResponse.ProtoReflect.Descriptor instead.
func (*GetPageResponse) GetPage ¶
func (x *GetPageResponse) GetPage() *internet.Page
func (*GetPageResponse) ProtoMessage ¶
func (*GetPageResponse) ProtoMessage()
func (*GetPageResponse) ProtoReflect ¶
func (x *GetPageResponse) ProtoReflect() protoreflect.Message
func (*GetPageResponse) Reset ¶
func (x *GetPageResponse) Reset()
func (*GetPageResponse) Sanitize ¶
func (m *GetPageResponse) Sanitize() error
func (*GetPageResponse) String ¶
func (x *GetPageResponse) String() string
func (*GetPageResponse) Validate ¶
func (m *GetPageResponse) Validate() error
Validate checks the field values on GetPageResponse 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 (*GetPageResponse) ValidateAll ¶
func (m *GetPageResponse) ValidateAll() error
ValidateAll checks the field values on GetPageResponse 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 GetPageResponseMultiError, or nil if none found.
type GetPageResponseMultiError ¶
type GetPageResponseMultiError []error
GetPageResponseMultiError is an error wrapping multiple validation errors returned by GetPageResponse.ValidateAll() if the designated constraints aren't met.
func (GetPageResponseMultiError) AllErrors ¶
func (m GetPageResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetPageResponseMultiError) Error ¶
func (m GetPageResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetPageResponseValidationError ¶
type GetPageResponseValidationError struct {
// contains filtered or unexported fields
}
GetPageResponseValidationError is the validation error returned by GetPageResponse.Validate if the designated constraints aren't met.
func (GetPageResponseValidationError) Cause ¶
func (e GetPageResponseValidationError) Cause() error
Cause function returns cause value.
func (GetPageResponseValidationError) Error ¶
func (e GetPageResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetPageResponseValidationError) ErrorName ¶
func (e GetPageResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetPageResponseValidationError) Field ¶
func (e GetPageResponseValidationError) Field() string
Field function returns field value.
func (GetPageResponseValidationError) Key ¶
func (e GetPageResponseValidationError) Key() bool
Key function returns key value.
func (GetPageResponseValidationError) Reason ¶
func (e GetPageResponseValidationError) Reason() string
Reason function returns reason value.
type InternetServiceClient ¶
type InternetServiceClient interface { // @perm: Name=Any Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) // @perm: Name=Any GetPage(ctx context.Context, in *GetPageRequest, opts ...grpc.CallOption) (*GetPageResponse, error) }
InternetServiceClient is the client API for InternetService 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 NewInternetServiceClient ¶
func NewInternetServiceClient(cc grpc.ClientConnInterface) InternetServiceClient
func NewTestInternetServiceClient ¶
func NewTestInternetServiceClient(srv InternetServiceServer) (InternetServiceClient, context.Context, context.CancelFunc)
type InternetServiceServer ¶
type InternetServiceServer interface { // @perm: Name=Any Search(context.Context, *SearchRequest) (*SearchResponse, error) // @perm: Name=Any GetPage(context.Context, *GetPageRequest) (*GetPageResponse, error) // contains filtered or unexported methods }
InternetServiceServer is the server API for InternetService service. All implementations must embed UnimplementedInternetServiceServer for forward compatibility
type SearchRequest ¶
type SearchRequest struct { Search string `protobuf:"bytes,1,opt,name=search,proto3" json:"search,omitempty"` // contains filtered or unexported fields }
func (*SearchRequest) Descriptor
deprecated
func (*SearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
func (*SearchRequest) GetSearch ¶
func (x *SearchRequest) GetSearch() string
func (*SearchRequest) ProtoMessage ¶
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) ProtoReflect ¶
func (x *SearchRequest) ProtoReflect() protoreflect.Message
func (*SearchRequest) Reset ¶
func (x *SearchRequest) Reset()
func (*SearchRequest) Sanitize ¶
func (m *SearchRequest) Sanitize() error
func (*SearchRequest) String ¶
func (x *SearchRequest) String() string
func (*SearchRequest) Validate ¶
func (m *SearchRequest) Validate() error
Validate checks the field values on SearchRequest 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 (*SearchRequest) ValidateAll ¶
func (m *SearchRequest) ValidateAll() error
ValidateAll checks the field values on SearchRequest 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 SearchRequestMultiError, or nil if none found.
type SearchRequestMultiError ¶
type SearchRequestMultiError []error
SearchRequestMultiError is an error wrapping multiple validation errors returned by SearchRequest.ValidateAll() if the designated constraints aren't met.
func (SearchRequestMultiError) AllErrors ¶
func (m SearchRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SearchRequestMultiError) Error ¶
func (m SearchRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SearchRequestValidationError ¶
type SearchRequestValidationError struct {
// contains filtered or unexported fields
}
SearchRequestValidationError is the validation error returned by SearchRequest.Validate if the designated constraints aren't met.
func (SearchRequestValidationError) Cause ¶
func (e SearchRequestValidationError) Cause() error
Cause function returns cause value.
func (SearchRequestValidationError) Error ¶
func (e SearchRequestValidationError) Error() string
Error satisfies the builtin error interface
func (SearchRequestValidationError) ErrorName ¶
func (e SearchRequestValidationError) ErrorName() string
ErrorName returns error name.
func (SearchRequestValidationError) Field ¶
func (e SearchRequestValidationError) Field() string
Field function returns field value.
func (SearchRequestValidationError) Key ¶
func (e SearchRequestValidationError) Key() bool
Key function returns key value.
func (SearchRequestValidationError) Reason ¶
func (e SearchRequestValidationError) Reason() string
Reason function returns reason value.
type SearchResponse ¶
type SearchResponse struct { Results []*internet.SearchResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*SearchResponse) Descriptor
deprecated
func (*SearchResponse) Descriptor() ([]byte, []int)
Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.
func (*SearchResponse) GetResults ¶
func (x *SearchResponse) GetResults() []*internet.SearchResult
func (*SearchResponse) ProtoMessage ¶
func (*SearchResponse) ProtoMessage()
func (*SearchResponse) ProtoReflect ¶
func (x *SearchResponse) ProtoReflect() protoreflect.Message
func (*SearchResponse) Reset ¶
func (x *SearchResponse) Reset()
func (*SearchResponse) Sanitize ¶
func (m *SearchResponse) Sanitize() error
func (*SearchResponse) String ¶
func (x *SearchResponse) String() string
func (*SearchResponse) Validate ¶
func (m *SearchResponse) Validate() error
Validate checks the field values on SearchResponse 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 (*SearchResponse) ValidateAll ¶
func (m *SearchResponse) ValidateAll() error
ValidateAll checks the field values on SearchResponse 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 SearchResponseMultiError, or nil if none found.
type SearchResponseMultiError ¶
type SearchResponseMultiError []error
SearchResponseMultiError is an error wrapping multiple validation errors returned by SearchResponse.ValidateAll() if the designated constraints aren't met.
func (SearchResponseMultiError) AllErrors ¶
func (m SearchResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SearchResponseMultiError) Error ¶
func (m SearchResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SearchResponseValidationError ¶
type SearchResponseValidationError struct {
// contains filtered or unexported fields
}
SearchResponseValidationError is the validation error returned by SearchResponse.Validate if the designated constraints aren't met.
func (SearchResponseValidationError) Cause ¶
func (e SearchResponseValidationError) Cause() error
Cause function returns cause value.
func (SearchResponseValidationError) Error ¶
func (e SearchResponseValidationError) Error() string
Error satisfies the builtin error interface
func (SearchResponseValidationError) ErrorName ¶
func (e SearchResponseValidationError) ErrorName() string
ErrorName returns error name.
func (SearchResponseValidationError) Field ¶
func (e SearchResponseValidationError) Field() string
Field function returns field value.
func (SearchResponseValidationError) Key ¶
func (e SearchResponseValidationError) Key() bool
Key function returns key value.
func (SearchResponseValidationError) Reason ¶
func (e SearchResponseValidationError) Reason() string
Reason function returns reason value.
type Server ¶
type Server struct { InternetServiceServer AdsServiceServer // contains filtered or unexported fields }
func (*Server) GetAds ¶
func (s *Server) GetAds(ctx context.Context, req *GetAdsRequest) (*GetAdsResponse, error)
func (*Server) GetPage ¶
func (s *Server) GetPage(ctx context.Context, req *GetPageRequest) (*GetPageResponse, error)
func (*Server) GetPermsRemap ¶
func (*Server) RegisterServer ¶
func (*Server) Search ¶
func (s *Server) Search(ctx context.Context, req *SearchRequest) (*SearchResponse, error)
type UnimplementedAdsServiceServer ¶
type UnimplementedAdsServiceServer struct { }
UnimplementedAdsServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAdsServiceServer) GetAds ¶
func (UnimplementedAdsServiceServer) GetAds(context.Context, *GetAdsRequest) (*GetAdsResponse, error)
type UnimplementedInternetServiceServer ¶
type UnimplementedInternetServiceServer struct { }
UnimplementedInternetServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedInternetServiceServer) GetPage ¶
func (UnimplementedInternetServiceServer) GetPage(context.Context, *GetPageRequest) (*GetPageResponse, error)
func (UnimplementedInternetServiceServer) Search ¶
func (UnimplementedInternetServiceServer) Search(context.Context, *SearchRequest) (*SearchResponse, error)
type UnsafeAdsServiceServer ¶
type UnsafeAdsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAdsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdsServiceServer will result in compilation errors.
type UnsafeInternetServiceServer ¶
type UnsafeInternetServiceServer interface {
// contains filtered or unexported methods
}
UnsafeInternetServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InternetServiceServer will result in compilation errors.