Documentation ¶
Overview ¶
Package reddit_feed_api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterRedditFeedAPIServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterRedditFeedAPIServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RedditFeedAPIServiceClient) error
- func RegisterRedditFeedAPIServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterRedditFeedAPIServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RedditFeedAPIServiceServer) error
- func RegisterRedditFeedAPIServiceServer(s grpc.ServiceRegistrar, srv RedditFeedAPIServiceServer)
- type CreatePostsV1Request
- func (*CreatePostsV1Request) Descriptor() ([]byte, []int)deprecated
- func (x *CreatePostsV1Request) GetPosts() []*Post
- func (*CreatePostsV1Request) ProtoMessage()
- func (x *CreatePostsV1Request) ProtoReflect() protoreflect.Message
- func (x *CreatePostsV1Request) Reset()
- func (x *CreatePostsV1Request) String() string
- func (m *CreatePostsV1Request) Validate() error
- func (m *CreatePostsV1Request) ValidateAll() error
- type CreatePostsV1RequestMultiError
- type CreatePostsV1RequestValidationError
- func (e CreatePostsV1RequestValidationError) Cause() error
- func (e CreatePostsV1RequestValidationError) Error() string
- func (e CreatePostsV1RequestValidationError) ErrorName() string
- func (e CreatePostsV1RequestValidationError) Field() string
- func (e CreatePostsV1RequestValidationError) Key() bool
- func (e CreatePostsV1RequestValidationError) Reason() string
- type CreatePostsV1Response
- func (*CreatePostsV1Response) Descriptor() ([]byte, []int)deprecated
- func (x *CreatePostsV1Response) GetNumberOfCreatedPosts() int64
- func (*CreatePostsV1Response) ProtoMessage()
- func (x *CreatePostsV1Response) ProtoReflect() protoreflect.Message
- func (x *CreatePostsV1Response) Reset()
- func (x *CreatePostsV1Response) String() string
- func (m *CreatePostsV1Response) Validate() error
- func (m *CreatePostsV1Response) ValidateAll() error
- type CreatePostsV1ResponseMultiError
- type CreatePostsV1ResponseValidationError
- func (e CreatePostsV1ResponseValidationError) Cause() error
- func (e CreatePostsV1ResponseValidationError) Error() string
- func (e CreatePostsV1ResponseValidationError) ErrorName() string
- func (e CreatePostsV1ResponseValidationError) Field() string
- func (e CreatePostsV1ResponseValidationError) Key() bool
- func (e CreatePostsV1ResponseValidationError) Reason() string
- type GenerateFeedV1Request
- func (*GenerateFeedV1Request) Descriptor() ([]byte, []int)deprecated
- func (x *GenerateFeedV1Request) GetPageId() uint64
- func (*GenerateFeedV1Request) ProtoMessage()
- func (x *GenerateFeedV1Request) ProtoReflect() protoreflect.Message
- func (x *GenerateFeedV1Request) Reset()
- func (x *GenerateFeedV1Request) String() string
- func (m *GenerateFeedV1Request) Validate() error
- func (m *GenerateFeedV1Request) ValidateAll() error
- type GenerateFeedV1RequestMultiError
- type GenerateFeedV1RequestValidationError
- func (e GenerateFeedV1RequestValidationError) Cause() error
- func (e GenerateFeedV1RequestValidationError) Error() string
- func (e GenerateFeedV1RequestValidationError) ErrorName() string
- func (e GenerateFeedV1RequestValidationError) Field() string
- func (e GenerateFeedV1RequestValidationError) Key() bool
- func (e GenerateFeedV1RequestValidationError) Reason() string
- type GenerateFeedV1Response
- func (*GenerateFeedV1Response) Descriptor() ([]byte, []int)deprecated
- func (x *GenerateFeedV1Response) GetPosts() []*Post
- func (*GenerateFeedV1Response) ProtoMessage()
- func (x *GenerateFeedV1Response) ProtoReflect() protoreflect.Message
- func (x *GenerateFeedV1Response) Reset()
- func (x *GenerateFeedV1Response) String() string
- func (m *GenerateFeedV1Response) Validate() error
- func (m *GenerateFeedV1Response) ValidateAll() error
- type GenerateFeedV1ResponseMultiError
- type GenerateFeedV1ResponseValidationError
- func (e GenerateFeedV1ResponseValidationError) Cause() error
- func (e GenerateFeedV1ResponseValidationError) Error() string
- func (e GenerateFeedV1ResponseValidationError) ErrorName() string
- func (e GenerateFeedV1ResponseValidationError) Field() string
- func (e GenerateFeedV1ResponseValidationError) Key() bool
- func (e GenerateFeedV1ResponseValidationError) Reason() string
- type Post
- func (*Post) Descriptor() ([]byte, []int)deprecated
- func (x *Post) GetAuthor() string
- func (x *Post) GetContent() string
- func (x *Post) GetLink() string
- func (x *Post) GetNotSafeForWork() bool
- func (m *Post) GetPostType() isPost_PostType
- func (x *Post) GetPromoted() bool
- func (x *Post) GetScore() uint64
- func (x *Post) GetSubreddit() string
- func (x *Post) GetTitle() string
- func (*Post) ProtoMessage()
- func (x *Post) ProtoReflect() protoreflect.Message
- func (x *Post) Reset()
- func (x *Post) String() string
- func (m *Post) Validate() error
- func (m *Post) ValidateAll() error
- type PostMultiError
- type PostValidationError
- type Post_Content
- type Post_Link
- type RedditFeedAPIServiceClient
- type RedditFeedAPIServiceServer
- type UnimplementedRedditFeedAPIServiceServer
- type UnsafeRedditFeedAPIServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_reddit_reddit_feed_api_v1_reddit_feed_api_proto protoreflect.FileDescriptor
var RedditFeedAPIService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "reddit.reddit_feed_api.v1.RedditFeedAPIService", HandlerType: (*RedditFeedAPIServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreatePostsV1", Handler: _RedditFeedAPIService_CreatePostsV1_Handler, }, { MethodName: "GenerateFeedV1", Handler: _RedditFeedAPIService_GenerateFeedV1_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "reddit/reddit_feed_api/v1/reddit_feed_api.proto", }
RedditFeedAPIService_ServiceDesc is the grpc.ServiceDesc for RedditFeedAPIService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRedditFeedAPIServiceHandler ¶
func RegisterRedditFeedAPIServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterRedditFeedAPIServiceHandler registers the http handlers for service RedditFeedAPIService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterRedditFeedAPIServiceHandlerClient ¶
func RegisterRedditFeedAPIServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RedditFeedAPIServiceClient) error
RegisterRedditFeedAPIServiceHandlerClient registers the http handlers for service RedditFeedAPIService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RedditFeedAPIServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RedditFeedAPIServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "RedditFeedAPIServiceClient" to call the correct interceptors.
func RegisterRedditFeedAPIServiceHandlerFromEndpoint ¶
func RegisterRedditFeedAPIServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterRedditFeedAPIServiceHandlerFromEndpoint is same as RegisterRedditFeedAPIServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterRedditFeedAPIServiceHandlerServer ¶
func RegisterRedditFeedAPIServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RedditFeedAPIServiceServer) error
RegisterRedditFeedAPIServiceHandlerServer registers the http handlers for service RedditFeedAPIService to "mux". UnaryRPC :call RedditFeedAPIServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRedditFeedAPIServiceHandlerFromEndpoint instead.
func RegisterRedditFeedAPIServiceServer ¶
func RegisterRedditFeedAPIServiceServer(s grpc.ServiceRegistrar, srv RedditFeedAPIServiceServer)
Types ¶
type CreatePostsV1Request ¶
type CreatePostsV1Request struct { Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` // contains filtered or unexported fields }
func (*CreatePostsV1Request) Descriptor
deprecated
func (*CreatePostsV1Request) Descriptor() ([]byte, []int)
Deprecated: Use CreatePostsV1Request.ProtoReflect.Descriptor instead.
func (*CreatePostsV1Request) GetPosts ¶
func (x *CreatePostsV1Request) GetPosts() []*Post
func (*CreatePostsV1Request) ProtoMessage ¶
func (*CreatePostsV1Request) ProtoMessage()
func (*CreatePostsV1Request) ProtoReflect ¶
func (x *CreatePostsV1Request) ProtoReflect() protoreflect.Message
func (*CreatePostsV1Request) Reset ¶
func (x *CreatePostsV1Request) Reset()
func (*CreatePostsV1Request) String ¶
func (x *CreatePostsV1Request) String() string
func (*CreatePostsV1Request) Validate ¶
func (m *CreatePostsV1Request) Validate() error
Validate checks the field values on CreatePostsV1Request 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 (*CreatePostsV1Request) ValidateAll ¶
func (m *CreatePostsV1Request) ValidateAll() error
ValidateAll checks the field values on CreatePostsV1Request 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 CreatePostsV1RequestMultiError, or nil if none found.
type CreatePostsV1RequestMultiError ¶
type CreatePostsV1RequestMultiError []error
CreatePostsV1RequestMultiError is an error wrapping multiple validation errors returned by CreatePostsV1Request.ValidateAll() if the designated constraints aren't met.
func (CreatePostsV1RequestMultiError) AllErrors ¶
func (m CreatePostsV1RequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreatePostsV1RequestMultiError) Error ¶
func (m CreatePostsV1RequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreatePostsV1RequestValidationError ¶
type CreatePostsV1RequestValidationError struct {
// contains filtered or unexported fields
}
CreatePostsV1RequestValidationError is the validation error returned by CreatePostsV1Request.Validate if the designated constraints aren't met.
func (CreatePostsV1RequestValidationError) Cause ¶
func (e CreatePostsV1RequestValidationError) Cause() error
Cause function returns cause value.
func (CreatePostsV1RequestValidationError) Error ¶
func (e CreatePostsV1RequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreatePostsV1RequestValidationError) ErrorName ¶
func (e CreatePostsV1RequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreatePostsV1RequestValidationError) Field ¶
func (e CreatePostsV1RequestValidationError) Field() string
Field function returns field value.
func (CreatePostsV1RequestValidationError) Key ¶
func (e CreatePostsV1RequestValidationError) Key() bool
Key function returns key value.
func (CreatePostsV1RequestValidationError) Reason ¶
func (e CreatePostsV1RequestValidationError) Reason() string
Reason function returns reason value.
type CreatePostsV1Response ¶
type CreatePostsV1Response struct { NumberOfCreatedPosts int64 `` /* 126-byte string literal not displayed */ // contains filtered or unexported fields }
func (*CreatePostsV1Response) Descriptor
deprecated
func (*CreatePostsV1Response) Descriptor() ([]byte, []int)
Deprecated: Use CreatePostsV1Response.ProtoReflect.Descriptor instead.
func (*CreatePostsV1Response) GetNumberOfCreatedPosts ¶
func (x *CreatePostsV1Response) GetNumberOfCreatedPosts() int64
func (*CreatePostsV1Response) ProtoMessage ¶
func (*CreatePostsV1Response) ProtoMessage()
func (*CreatePostsV1Response) ProtoReflect ¶
func (x *CreatePostsV1Response) ProtoReflect() protoreflect.Message
func (*CreatePostsV1Response) Reset ¶
func (x *CreatePostsV1Response) Reset()
func (*CreatePostsV1Response) String ¶
func (x *CreatePostsV1Response) String() string
func (*CreatePostsV1Response) Validate ¶
func (m *CreatePostsV1Response) Validate() error
Validate checks the field values on CreatePostsV1Response 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 (*CreatePostsV1Response) ValidateAll ¶
func (m *CreatePostsV1Response) ValidateAll() error
ValidateAll checks the field values on CreatePostsV1Response 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 CreatePostsV1ResponseMultiError, or nil if none found.
type CreatePostsV1ResponseMultiError ¶
type CreatePostsV1ResponseMultiError []error
CreatePostsV1ResponseMultiError is an error wrapping multiple validation errors returned by CreatePostsV1Response.ValidateAll() if the designated constraints aren't met.
func (CreatePostsV1ResponseMultiError) AllErrors ¶
func (m CreatePostsV1ResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreatePostsV1ResponseMultiError) Error ¶
func (m CreatePostsV1ResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreatePostsV1ResponseValidationError ¶
type CreatePostsV1ResponseValidationError struct {
// contains filtered or unexported fields
}
CreatePostsV1ResponseValidationError is the validation error returned by CreatePostsV1Response.Validate if the designated constraints aren't met.
func (CreatePostsV1ResponseValidationError) Cause ¶
func (e CreatePostsV1ResponseValidationError) Cause() error
Cause function returns cause value.
func (CreatePostsV1ResponseValidationError) Error ¶
func (e CreatePostsV1ResponseValidationError) Error() string
Error satisfies the builtin error interface
func (CreatePostsV1ResponseValidationError) ErrorName ¶
func (e CreatePostsV1ResponseValidationError) ErrorName() string
ErrorName returns error name.
func (CreatePostsV1ResponseValidationError) Field ¶
func (e CreatePostsV1ResponseValidationError) Field() string
Field function returns field value.
func (CreatePostsV1ResponseValidationError) Key ¶
func (e CreatePostsV1ResponseValidationError) Key() bool
Key function returns key value.
func (CreatePostsV1ResponseValidationError) Reason ¶
func (e CreatePostsV1ResponseValidationError) Reason() string
Reason function returns reason value.
type GenerateFeedV1Request ¶
type GenerateFeedV1Request struct { PageId uint64 `protobuf:"varint,1,opt,name=page_id,json=pageId,proto3" json:"page_id,omitempty"` // contains filtered or unexported fields }
func (*GenerateFeedV1Request) Descriptor
deprecated
func (*GenerateFeedV1Request) Descriptor() ([]byte, []int)
Deprecated: Use GenerateFeedV1Request.ProtoReflect.Descriptor instead.
func (*GenerateFeedV1Request) GetPageId ¶
func (x *GenerateFeedV1Request) GetPageId() uint64
func (*GenerateFeedV1Request) ProtoMessage ¶
func (*GenerateFeedV1Request) ProtoMessage()
func (*GenerateFeedV1Request) ProtoReflect ¶
func (x *GenerateFeedV1Request) ProtoReflect() protoreflect.Message
func (*GenerateFeedV1Request) Reset ¶
func (x *GenerateFeedV1Request) Reset()
func (*GenerateFeedV1Request) String ¶
func (x *GenerateFeedV1Request) String() string
func (*GenerateFeedV1Request) Validate ¶
func (m *GenerateFeedV1Request) Validate() error
Validate checks the field values on GenerateFeedV1Request 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 (*GenerateFeedV1Request) ValidateAll ¶
func (m *GenerateFeedV1Request) ValidateAll() error
ValidateAll checks the field values on GenerateFeedV1Request 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 GenerateFeedV1RequestMultiError, or nil if none found.
type GenerateFeedV1RequestMultiError ¶
type GenerateFeedV1RequestMultiError []error
GenerateFeedV1RequestMultiError is an error wrapping multiple validation errors returned by GenerateFeedV1Request.ValidateAll() if the designated constraints aren't met.
func (GenerateFeedV1RequestMultiError) AllErrors ¶
func (m GenerateFeedV1RequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GenerateFeedV1RequestMultiError) Error ¶
func (m GenerateFeedV1RequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GenerateFeedV1RequestValidationError ¶
type GenerateFeedV1RequestValidationError struct {
// contains filtered or unexported fields
}
GenerateFeedV1RequestValidationError is the validation error returned by GenerateFeedV1Request.Validate if the designated constraints aren't met.
func (GenerateFeedV1RequestValidationError) Cause ¶
func (e GenerateFeedV1RequestValidationError) Cause() error
Cause function returns cause value.
func (GenerateFeedV1RequestValidationError) Error ¶
func (e GenerateFeedV1RequestValidationError) Error() string
Error satisfies the builtin error interface
func (GenerateFeedV1RequestValidationError) ErrorName ¶
func (e GenerateFeedV1RequestValidationError) ErrorName() string
ErrorName returns error name.
func (GenerateFeedV1RequestValidationError) Field ¶
func (e GenerateFeedV1RequestValidationError) Field() string
Field function returns field value.
func (GenerateFeedV1RequestValidationError) Key ¶
func (e GenerateFeedV1RequestValidationError) Key() bool
Key function returns key value.
func (GenerateFeedV1RequestValidationError) Reason ¶
func (e GenerateFeedV1RequestValidationError) Reason() string
Reason function returns reason value.
type GenerateFeedV1Response ¶
type GenerateFeedV1Response struct { Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` // contains filtered or unexported fields }
func (*GenerateFeedV1Response) Descriptor
deprecated
func (*GenerateFeedV1Response) Descriptor() ([]byte, []int)
Deprecated: Use GenerateFeedV1Response.ProtoReflect.Descriptor instead.
func (*GenerateFeedV1Response) GetPosts ¶
func (x *GenerateFeedV1Response) GetPosts() []*Post
func (*GenerateFeedV1Response) ProtoMessage ¶
func (*GenerateFeedV1Response) ProtoMessage()
func (*GenerateFeedV1Response) ProtoReflect ¶
func (x *GenerateFeedV1Response) ProtoReflect() protoreflect.Message
func (*GenerateFeedV1Response) Reset ¶
func (x *GenerateFeedV1Response) Reset()
func (*GenerateFeedV1Response) String ¶
func (x *GenerateFeedV1Response) String() string
func (*GenerateFeedV1Response) Validate ¶
func (m *GenerateFeedV1Response) Validate() error
Validate checks the field values on GenerateFeedV1Response 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 (*GenerateFeedV1Response) ValidateAll ¶
func (m *GenerateFeedV1Response) ValidateAll() error
ValidateAll checks the field values on GenerateFeedV1Response 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 GenerateFeedV1ResponseMultiError, or nil if none found.
type GenerateFeedV1ResponseMultiError ¶
type GenerateFeedV1ResponseMultiError []error
GenerateFeedV1ResponseMultiError is an error wrapping multiple validation errors returned by GenerateFeedV1Response.ValidateAll() if the designated constraints aren't met.
func (GenerateFeedV1ResponseMultiError) AllErrors ¶
func (m GenerateFeedV1ResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GenerateFeedV1ResponseMultiError) Error ¶
func (m GenerateFeedV1ResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GenerateFeedV1ResponseValidationError ¶
type GenerateFeedV1ResponseValidationError struct {
// contains filtered or unexported fields
}
GenerateFeedV1ResponseValidationError is the validation error returned by GenerateFeedV1Response.Validate if the designated constraints aren't met.
func (GenerateFeedV1ResponseValidationError) Cause ¶
func (e GenerateFeedV1ResponseValidationError) Cause() error
Cause function returns cause value.
func (GenerateFeedV1ResponseValidationError) Error ¶
func (e GenerateFeedV1ResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GenerateFeedV1ResponseValidationError) ErrorName ¶
func (e GenerateFeedV1ResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GenerateFeedV1ResponseValidationError) Field ¶
func (e GenerateFeedV1ResponseValidationError) Field() string
Field function returns field value.
func (GenerateFeedV1ResponseValidationError) Key ¶
func (e GenerateFeedV1ResponseValidationError) Key() bool
Key function returns key value.
func (GenerateFeedV1ResponseValidationError) Reason ¶
func (e GenerateFeedV1ResponseValidationError) Reason() string
Reason function returns reason value.
type Post ¶
type Post struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Author string `protobuf:"bytes,2,opt,name=author,proto3" json:"author,omitempty"` Subreddit string `protobuf:"bytes,3,opt,name=subreddit,proto3" json:"subreddit,omitempty"` // Types that are assignable to PostType: // // *Post_Link // *Post_Content PostType isPost_PostType `protobuf_oneof:"post_type"` Score uint64 `protobuf:"varint,6,opt,name=score,proto3" json:"score,omitempty"` Promoted bool `protobuf:"varint,7,opt,name=promoted,proto3" json:"promoted,omitempty"` NotSafeForWork bool `protobuf:"varint,8,opt,name=not_safe_for_work,json=notSafeForWork,proto3" json:"not_safe_for_work,omitempty"` // contains filtered or unexported fields }
func (*Post) Descriptor
deprecated
func (*Post) GetContent ¶
func (*Post) GetNotSafeForWork ¶
func (*Post) GetPostType ¶
func (m *Post) GetPostType() isPost_PostType
func (*Post) GetPromoted ¶
func (*Post) GetSubreddit ¶
func (*Post) ProtoMessage ¶
func (*Post) ProtoMessage()
func (*Post) ProtoReflect ¶
func (x *Post) ProtoReflect() protoreflect.Message
func (*Post) Validate ¶
Validate checks the field values on Post 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 (*Post) ValidateAll ¶
ValidateAll checks the field values on Post 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 PostMultiError, or nil if none found.
type PostMultiError ¶
type PostMultiError []error
PostMultiError is an error wrapping multiple validation errors returned by Post.ValidateAll() if the designated constraints aren't met.
func (PostMultiError) AllErrors ¶
func (m PostMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PostMultiError) Error ¶
func (m PostMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PostValidationError ¶
type PostValidationError struct {
// contains filtered or unexported fields
}
PostValidationError is the validation error returned by Post.Validate if the designated constraints aren't met.
func (PostValidationError) Cause ¶
func (e PostValidationError) Cause() error
Cause function returns cause value.
func (PostValidationError) Error ¶
func (e PostValidationError) Error() string
Error satisfies the builtin error interface
func (PostValidationError) ErrorName ¶
func (e PostValidationError) ErrorName() string
ErrorName returns error name.
func (PostValidationError) Field ¶
func (e PostValidationError) Field() string
Field function returns field value.
func (PostValidationError) Key ¶
func (e PostValidationError) Key() bool
Key function returns key value.
func (PostValidationError) Reason ¶
func (e PostValidationError) Reason() string
Reason function returns reason value.
type Post_Content ¶
type Post_Content struct {
Content string `protobuf:"bytes,5,opt,name=content,proto3,oneof"`
}
type Post_Link ¶
type Post_Link struct {
Link string `protobuf:"bytes,4,opt,name=link,proto3,oneof"`
}
type RedditFeedAPIServiceClient ¶
type RedditFeedAPIServiceClient interface { // Create new posts CreatePostsV1(ctx context.Context, in *CreatePostsV1Request, opts ...grpc.CallOption) (*CreatePostsV1Response, error) // Generate a feed of posts GenerateFeedV1(ctx context.Context, in *GenerateFeedV1Request, opts ...grpc.CallOption) (*GenerateFeedV1Response, error) }
RedditFeedAPIServiceClient is the client API for RedditFeedAPIService 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 NewRedditFeedAPIServiceClient ¶
func NewRedditFeedAPIServiceClient(cc grpc.ClientConnInterface) RedditFeedAPIServiceClient
type RedditFeedAPIServiceServer ¶
type RedditFeedAPIServiceServer interface { // Create new posts CreatePostsV1(context.Context, *CreatePostsV1Request) (*CreatePostsV1Response, error) // Generate a feed of posts GenerateFeedV1(context.Context, *GenerateFeedV1Request) (*GenerateFeedV1Response, error) // contains filtered or unexported methods }
RedditFeedAPIServiceServer is the server API for RedditFeedAPIService service. All implementations must embed UnimplementedRedditFeedAPIServiceServer for forward compatibility
type UnimplementedRedditFeedAPIServiceServer ¶
type UnimplementedRedditFeedAPIServiceServer struct { }
UnimplementedRedditFeedAPIServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedRedditFeedAPIServiceServer) CreatePostsV1 ¶
func (UnimplementedRedditFeedAPIServiceServer) CreatePostsV1(context.Context, *CreatePostsV1Request) (*CreatePostsV1Response, error)
func (UnimplementedRedditFeedAPIServiceServer) GenerateFeedV1 ¶
func (UnimplementedRedditFeedAPIServiceServer) GenerateFeedV1(context.Context, *GenerateFeedV1Request) (*GenerateFeedV1Response, error)
type UnsafeRedditFeedAPIServiceServer ¶
type UnsafeRedditFeedAPIServiceServer interface {
// contains filtered or unexported methods
}
UnsafeRedditFeedAPIServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RedditFeedAPIServiceServer will result in compilation errors.