newsroom

package
v1.7.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NewsroomAPI_CreateNewsArticle_FullMethodName  = "/api.v1alpha1.newsroom.NewsroomAPI/CreateNewsArticle"
	NewsroomAPI_ListNewsArticles_FullMethodName   = "/api.v1alpha1.newsroom.NewsroomAPI/ListNewsArticles"
	NewsroomAPI_GetNewsArticleById_FullMethodName = "/api.v1alpha1.newsroom.NewsroomAPI/GetNewsArticleById"
	NewsroomAPI_UpdateNewsArticle_FullMethodName  = "/api.v1alpha1.newsroom.NewsroomAPI/UpdateNewsArticle"
)

Variables

View Source
var File_api_v1alpha1_newsroom_entities_proto protoreflect.FileDescriptor
View Source
var File_api_v1alpha1_newsroom_service_proto protoreflect.FileDescriptor
View Source
var NewsroomAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.v1alpha1.newsroom.NewsroomAPI",
	HandlerType: (*NewsroomAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateNewsArticle",
			Handler:    _NewsroomAPI_CreateNewsArticle_Handler,
		},
		{
			MethodName: "ListNewsArticles",
			Handler:    _NewsroomAPI_ListNewsArticles_Handler,
		},
		{
			MethodName: "GetNewsArticleById",
			Handler:    _NewsroomAPI_GetNewsArticleById_Handler,
		},
		{
			MethodName: "UpdateNewsArticle",
			Handler:    _NewsroomAPI_UpdateNewsArticle_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1alpha1/newsroom/service.proto",
}

NewsroomAPI_ServiceDesc is the grpc.ServiceDesc for NewsroomAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterNewsroomAPIServer

func RegisterNewsroomAPIServer(s grpc.ServiceRegistrar, srv NewsroomAPIServer)

Types

type CreateNewsArticleRequest

type CreateNewsArticleRequest struct {

	// news article title
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// markdown content
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

Request to create news article

func (*CreateNewsArticleRequest) Descriptor deprecated

func (*CreateNewsArticleRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateNewsArticleRequest.ProtoReflect.Descriptor instead.

func (*CreateNewsArticleRequest) GetContent

func (x *CreateNewsArticleRequest) GetContent() string

func (*CreateNewsArticleRequest) GetTitle

func (x *CreateNewsArticleRequest) GetTitle() string

func (*CreateNewsArticleRequest) ProtoMessage

func (*CreateNewsArticleRequest) ProtoMessage()

func (*CreateNewsArticleRequest) ProtoReflect

func (x *CreateNewsArticleRequest) ProtoReflect() protoreflect.Message

func (*CreateNewsArticleRequest) Reset

func (x *CreateNewsArticleRequest) Reset()

func (*CreateNewsArticleRequest) String

func (x *CreateNewsArticleRequest) String() string

type CreateNewsArticleResponse

type CreateNewsArticleResponse struct {

	// news article details
	ArticleDetails *NewsArticleDetails `protobuf:"bytes,1,opt,name=article_details,json=articleDetails,proto3" json:"article_details,omitempty"`
	// contains filtered or unexported fields
}

Response to create news article

func (*CreateNewsArticleResponse) Descriptor deprecated

func (*CreateNewsArticleResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateNewsArticleResponse.ProtoReflect.Descriptor instead.

func (*CreateNewsArticleResponse) GetArticleDetails

func (x *CreateNewsArticleResponse) GetArticleDetails() *NewsArticleDetails

func (*CreateNewsArticleResponse) ProtoMessage

func (*CreateNewsArticleResponse) ProtoMessage()

func (*CreateNewsArticleResponse) ProtoReflect

func (*CreateNewsArticleResponse) Reset

func (x *CreateNewsArticleResponse) Reset()

func (*CreateNewsArticleResponse) String

func (x *CreateNewsArticleResponse) String() string

type GetNewsArticleByIdRequest

type GetNewsArticleByIdRequest struct {

	// the unique news article identifier
	NewArticleSid int64 `protobuf:"varint,1,opt,name=new_article_sid,json=newArticleSid,proto3" json:"new_article_sid,omitempty"`
	// contains filtered or unexported fields
}

Request to get news article by id

func (*GetNewsArticleByIdRequest) Descriptor deprecated

func (*GetNewsArticleByIdRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetNewsArticleByIdRequest.ProtoReflect.Descriptor instead.

func (*GetNewsArticleByIdRequest) GetNewArticleSid

func (x *GetNewsArticleByIdRequest) GetNewArticleSid() int64

func (*GetNewsArticleByIdRequest) ProtoMessage

func (*GetNewsArticleByIdRequest) ProtoMessage()

func (*GetNewsArticleByIdRequest) ProtoReflect

func (*GetNewsArticleByIdRequest) Reset

func (x *GetNewsArticleByIdRequest) Reset()

func (*GetNewsArticleByIdRequest) String

func (x *GetNewsArticleByIdRequest) String() string

type GetNewsArticleByIdResponse

type GetNewsArticleByIdResponse struct {

	// news article details
	ArticleDetails *NewsArticleDetails `protobuf:"bytes,1,opt,name=article_details,json=articleDetails,proto3" json:"article_details,omitempty"`
	// contains filtered or unexported fields
}

Response to get news article

func (*GetNewsArticleByIdResponse) Descriptor deprecated

func (*GetNewsArticleByIdResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetNewsArticleByIdResponse.ProtoReflect.Descriptor instead.

func (*GetNewsArticleByIdResponse) GetArticleDetails

func (x *GetNewsArticleByIdResponse) GetArticleDetails() *NewsArticleDetails

func (*GetNewsArticleByIdResponse) ProtoMessage

func (*GetNewsArticleByIdResponse) ProtoMessage()

func (*GetNewsArticleByIdResponse) ProtoReflect

func (*GetNewsArticleByIdResponse) Reset

func (x *GetNewsArticleByIdResponse) Reset()

func (*GetNewsArticleByIdResponse) String

func (x *GetNewsArticleByIdResponse) String() string

type ListNewsArticlesRequest

type ListNewsArticlesRequest struct {

	// the statuses to select by when listing articles (if empty, selects all)
	Statuses []commons.ArticleStatus `protobuf:"varint,1,rep,packed,name=statuses,proto3,enum=api.commons.ArticleStatus" json:"statuses,omitempty"`
	// list of article details to be Requested
	FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,100,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"`
	// contains filtered or unexported fields
}

Request to list of news articles

func (*ListNewsArticlesRequest) Descriptor deprecated

func (*ListNewsArticlesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListNewsArticlesRequest.ProtoReflect.Descriptor instead.

func (*ListNewsArticlesRequest) GetFieldMask

func (x *ListNewsArticlesRequest) GetFieldMask() *fieldmaskpb.FieldMask

func (*ListNewsArticlesRequest) GetStatuses

func (x *ListNewsArticlesRequest) GetStatuses() []commons.ArticleStatus

func (*ListNewsArticlesRequest) ProtoMessage

func (*ListNewsArticlesRequest) ProtoMessage()

func (*ListNewsArticlesRequest) ProtoReflect

func (x *ListNewsArticlesRequest) ProtoReflect() protoreflect.Message

func (*ListNewsArticlesRequest) Reset

func (x *ListNewsArticlesRequest) Reset()

func (*ListNewsArticlesRequest) String

func (x *ListNewsArticlesRequest) String() string

type ListNewsArticlesResponse

type ListNewsArticlesResponse struct {

	// article details
	ArticleDetails []*NewsArticleDetails `protobuf:"bytes,1,rep,name=article_details,json=articleDetails,proto3" json:"article_details,omitempty"`
	// contains filtered or unexported fields
}

Responseponse to list of news articles

func (*ListNewsArticlesResponse) Descriptor deprecated

func (*ListNewsArticlesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListNewsArticlesResponse.ProtoReflect.Descriptor instead.

func (*ListNewsArticlesResponse) GetArticleDetails

func (x *ListNewsArticlesResponse) GetArticleDetails() []*NewsArticleDetails

func (*ListNewsArticlesResponse) ProtoMessage

func (*ListNewsArticlesResponse) ProtoMessage()

func (*ListNewsArticlesResponse) ProtoReflect

func (x *ListNewsArticlesResponse) ProtoReflect() protoreflect.Message

func (*ListNewsArticlesResponse) Reset

func (x *ListNewsArticlesResponse) Reset()

func (*ListNewsArticlesResponse) String

func (x *ListNewsArticlesResponse) String() string

type NewsArticleDetails

type NewsArticleDetails struct {

	// the unique news article identifier
	NewArticleSid int64 `protobuf:"varint,1,opt,name=new_article_sid,json=newArticleSid,proto3" json:"new_article_sid,omitempty"`
	// news article title
	Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	// markdown content
	Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	// article status
	Status commons.ArticleStatus `protobuf:"varint,4,opt,name=status,proto3,enum=api.commons.ArticleStatus" json:"status,omitempty"`
	// news article creation date
	DateCreated *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=date_created,json=dateCreated,proto3" json:"date_created,omitempty"`
	// news article last updated date
	LastEdited *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_edited,json=lastEdited,proto3" json:"last_edited,omitempty"`
	// contains filtered or unexported fields
}

news article details

func (*NewsArticleDetails) Descriptor deprecated

func (*NewsArticleDetails) Descriptor() ([]byte, []int)

Deprecated: Use NewsArticleDetails.ProtoReflect.Descriptor instead.

func (*NewsArticleDetails) GetContent

func (x *NewsArticleDetails) GetContent() string

func (*NewsArticleDetails) GetDateCreated

func (x *NewsArticleDetails) GetDateCreated() *timestamppb.Timestamp

func (*NewsArticleDetails) GetLastEdited

func (x *NewsArticleDetails) GetLastEdited() *timestamppb.Timestamp

func (*NewsArticleDetails) GetNewArticleSid

func (x *NewsArticleDetails) GetNewArticleSid() int64

func (*NewsArticleDetails) GetStatus

func (x *NewsArticleDetails) GetStatus() commons.ArticleStatus

func (*NewsArticleDetails) GetTitle

func (x *NewsArticleDetails) GetTitle() string

func (*NewsArticleDetails) ProtoMessage

func (*NewsArticleDetails) ProtoMessage()

func (*NewsArticleDetails) ProtoReflect

func (x *NewsArticleDetails) ProtoReflect() protoreflect.Message

func (*NewsArticleDetails) Reset

func (x *NewsArticleDetails) Reset()

func (*NewsArticleDetails) String

func (x *NewsArticleDetails) String() string

type NewsroomAPIClient

type NewsroomAPIClient interface {
	// create news article
	CreateNewsArticle(ctx context.Context, in *CreateNewsArticleRequest, opts ...grpc.CallOption) (*CreateNewsArticleResponse, error)
	// list news articles
	ListNewsArticles(ctx context.Context, in *ListNewsArticlesRequest, opts ...grpc.CallOption) (*ListNewsArticlesResponse, error)
	// get news article details by the id
	GetNewsArticleById(ctx context.Context, in *GetNewsArticleByIdRequest, opts ...grpc.CallOption) (*GetNewsArticleByIdResponse, error)
	// update news article
	UpdateNewsArticle(ctx context.Context, in *UpdateNewsArticleRequest, opts ...grpc.CallOption) (*UpdateNewsArticleResponse, error)
}

NewsroomAPIClient is the client API for NewsroomAPI 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.

type NewsroomAPIServer

type NewsroomAPIServer interface {
	// create news article
	CreateNewsArticle(context.Context, *CreateNewsArticleRequest) (*CreateNewsArticleResponse, error)
	// list news articles
	ListNewsArticles(context.Context, *ListNewsArticlesRequest) (*ListNewsArticlesResponse, error)
	// get news article details by the id
	GetNewsArticleById(context.Context, *GetNewsArticleByIdRequest) (*GetNewsArticleByIdResponse, error)
	// update news article
	UpdateNewsArticle(context.Context, *UpdateNewsArticleRequest) (*UpdateNewsArticleResponse, error)
	// contains filtered or unexported methods
}

NewsroomAPIServer is the server API for NewsroomAPI service. All implementations must embed UnimplementedNewsroomAPIServer for forward compatibility

type UnimplementedNewsroomAPIServer

type UnimplementedNewsroomAPIServer struct {
}

UnimplementedNewsroomAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedNewsroomAPIServer) CreateNewsArticle

func (UnimplementedNewsroomAPIServer) GetNewsArticleById

func (UnimplementedNewsroomAPIServer) ListNewsArticles

func (UnimplementedNewsroomAPIServer) UpdateNewsArticle

type UnsafeNewsroomAPIServer

type UnsafeNewsroomAPIServer interface {
	// contains filtered or unexported methods
}

UnsafeNewsroomAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NewsroomAPIServer will result in compilation errors.

type UpdateNewsArticleRequest

type UpdateNewsArticleRequest struct {

	// the news article fields specified to be updated
	ArticleDetails *NewsArticleDetails `protobuf:"bytes,1,opt,name=article_details,json=articleDetails,proto3" json:"article_details,omitempty"`
	// list of fields Requested to be updated
	FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,100,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"`
	// contains filtered or unexported fields
}

Request to update news article

func (*UpdateNewsArticleRequest) Descriptor deprecated

func (*UpdateNewsArticleRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateNewsArticleRequest.ProtoReflect.Descriptor instead.

func (*UpdateNewsArticleRequest) GetArticleDetails

func (x *UpdateNewsArticleRequest) GetArticleDetails() *NewsArticleDetails

func (*UpdateNewsArticleRequest) GetFieldMask

func (x *UpdateNewsArticleRequest) GetFieldMask() *fieldmaskpb.FieldMask

func (*UpdateNewsArticleRequest) ProtoMessage

func (*UpdateNewsArticleRequest) ProtoMessage()

func (*UpdateNewsArticleRequest) ProtoReflect

func (x *UpdateNewsArticleRequest) ProtoReflect() protoreflect.Message

func (*UpdateNewsArticleRequest) Reset

func (x *UpdateNewsArticleRequest) Reset()

func (*UpdateNewsArticleRequest) String

func (x *UpdateNewsArticleRequest) String() string

type UpdateNewsArticleResponse

type UpdateNewsArticleResponse struct {

	// latest news article
	ArticleDetails *NewsArticleDetails `protobuf:"bytes,1,opt,name=article_details,json=articleDetails,proto3" json:"article_details,omitempty"`
	// contains filtered or unexported fields
}

Response to update news article

func (*UpdateNewsArticleResponse) Descriptor deprecated

func (*UpdateNewsArticleResponse) Descriptor() ([]byte, []int)

Deprecated: Use UpdateNewsArticleResponse.ProtoReflect.Descriptor instead.

func (*UpdateNewsArticleResponse) GetArticleDetails

func (x *UpdateNewsArticleResponse) GetArticleDetails() *NewsArticleDetails

func (*UpdateNewsArticleResponse) ProtoMessage

func (*UpdateNewsArticleResponse) ProtoMessage()

func (*UpdateNewsArticleResponse) ProtoReflect

func (*UpdateNewsArticleResponse) Reset

func (x *UpdateNewsArticleResponse) Reset()

func (*UpdateNewsArticleResponse) String

func (x *UpdateNewsArticleResponse) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL