newsroomconnect

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NewsroomAPICreateNewsArticleProcedure is the fully-qualified name of the NewsroomAPI's
	// CreateNewsArticle RPC.
	NewsroomAPICreateNewsArticleProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/CreateNewsArticle"
	// NewsroomAPIListNewsArticlesProcedure is the fully-qualified name of the NewsroomAPI's
	// ListNewsArticles RPC.
	NewsroomAPIListNewsArticlesProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/ListNewsArticles"
	// NewsroomAPIGetNewsArticleByIdProcedure is the fully-qualified name of the NewsroomAPI's
	// GetNewsArticleById RPC.
	NewsroomAPIGetNewsArticleByIdProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/GetNewsArticleById"
	// NewsroomAPIUpdateNewsArticleProcedure is the fully-qualified name of the NewsroomAPI's
	// UpdateNewsArticle RPC.
	NewsroomAPIUpdateNewsArticleProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/UpdateNewsArticle"
	// NewsroomAPICreatePublishedArticleProcedure is the fully-qualified name of the NewsroomAPI's
	// CreatePublishedArticle RPC.
	NewsroomAPICreatePublishedArticleProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/CreatePublishedArticle"
	// NewsroomAPIListPublishedArticlesProcedure is the fully-qualified name of the NewsroomAPI's
	// ListPublishedArticles RPC.
	NewsroomAPIListPublishedArticlesProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/ListPublishedArticles"
	// NewsroomAPIGetPublishedArticleByIdProcedure is the fully-qualified name of the NewsroomAPI's
	// GetPublishedArticleById RPC.
	NewsroomAPIGetPublishedArticleByIdProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/GetPublishedArticleById"
	// NewsroomAPIUserActivityProcedure is the fully-qualified name of the NewsroomAPI's UserActivity
	// RPC.
	NewsroomAPIUserActivityProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/UserActivity"
	// NewsroomAPIGetNewsForUserProcedure is the fully-qualified name of the NewsroomAPI's
	// GetNewsForUser RPC.
	NewsroomAPIGetNewsForUserProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/GetNewsForUser"
	// NewsroomAPIStoreNewsArticleImageProcedure is the fully-qualified name of the NewsroomAPI's
	// StoreNewsArticleImage RPC.
	NewsroomAPIStoreNewsArticleImageProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/StoreNewsArticleImage"
	// NewsroomAPIListImagesForNewsArticleProcedure is the fully-qualified name of the NewsroomAPI's
	// ListImagesForNewsArticle RPC.
	NewsroomAPIListImagesForNewsArticleProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/ListImagesForNewsArticle"
	// NewsroomAPIUploadNewsArticleImageProcedure is the fully-qualified name of the NewsroomAPI's
	// UploadNewsArticleImage RPC.
	NewsroomAPIUploadNewsArticleImageProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/UploadNewsArticleImage"
	// NewsroomAPICreateClientArticleProcedure is the fully-qualified name of the NewsroomAPI's
	// CreateClientArticle RPC.
	NewsroomAPICreateClientArticleProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/CreateClientArticle"
	// NewsroomAPIUpdateClientArticleProcedure is the fully-qualified name of the NewsroomAPI's
	// UpdateClientArticle RPC.
	NewsroomAPIUpdateClientArticleProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/UpdateClientArticle"
	// NewsroomAPIListClientArticlesProcedure is the fully-qualified name of the NewsroomAPI's
	// ListClientArticles RPC.
	NewsroomAPIListClientArticlesProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/ListClientArticles"
	// NewsroomAPICreatePublishedClientArticleProcedure is the fully-qualified name of the NewsroomAPI's
	// CreatePublishedClientArticle RPC.
	NewsroomAPICreatePublishedClientArticleProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/CreatePublishedClientArticle"
	// NewsroomAPIGetPublishedClientArticleByIdProcedure is the fully-qualified name of the
	// NewsroomAPI's GetPublishedClientArticleById RPC.
	NewsroomAPIGetPublishedClientArticleByIdProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/GetPublishedClientArticleById"
	// NewsroomAPIStoreClientArticleImageProcedure is the fully-qualified name of the NewsroomAPI's
	// StoreClientArticleImage RPC.
	NewsroomAPIStoreClientArticleImageProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/StoreClientArticleImage"
	// NewsroomAPIListImagesForClientArticleProcedure is the fully-qualified name of the NewsroomAPI's
	// ListImagesForClientArticle RPC.
	NewsroomAPIListImagesForClientArticleProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/ListImagesForClientArticle"
	// NewsroomAPIUploadClientArticleImageProcedure is the fully-qualified name of the NewsroomAPI's
	// UploadClientArticleImage RPC.
	NewsroomAPIUploadClientArticleImageProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/UploadClientArticleImage"
	// NewsroomAPIListPublishedClientArticlesProcedure is the fully-qualified name of the NewsroomAPI's
	// ListPublishedClientArticles RPC.
	NewsroomAPIListPublishedClientArticlesProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/ListPublishedClientArticles"
	// NewsroomAPIGetClientArticleByIdProcedure is the fully-qualified name of the NewsroomAPI's
	// GetClientArticleById RPC.
	NewsroomAPIGetClientArticleByIdProcedure = "/api.v1alpha1.newsroom.NewsroomAPI/GetClientArticleById"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// NewsroomAPIName is the fully-qualified name of the NewsroomAPI service.
	NewsroomAPIName = "api.v1alpha1.newsroom.NewsroomAPI"
)

Variables

This section is empty.

Functions

func NewNewsroomAPIHandler

func NewNewsroomAPIHandler(svc NewsroomAPIHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewNewsroomAPIHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type NewsroomAPIClient

type NewsroomAPIClient interface {
	// create news article
	CreateNewsArticle(context.Context, *connect_go.Request[newsroom.CreateNewsArticleRequest]) (*connect_go.Response[newsroom.CreateNewsArticleResponse], error)
	// list news articles
	ListNewsArticles(context.Context, *connect_go.Request[newsroom.ListNewsArticlesRequest]) (*connect_go.Response[newsroom.ListNewsArticlesResponse], error)
	// get news article details by the id
	GetNewsArticleById(context.Context, *connect_go.Request[newsroom.GetNewsArticleByIdRequest]) (*connect_go.Response[newsroom.GetNewsArticleByIdResponse], error)
	// update news article
	UpdateNewsArticle(context.Context, *connect_go.Request[newsroom.UpdateNewsArticleRequest]) (*connect_go.Response[newsroom.UpdateNewsArticleResponse], error)
	// create published article
	CreatePublishedArticle(context.Context, *connect_go.Request[newsroom.CreatePublishedArticleRequest]) (*connect_go.Response[newsroom.CreatePublishedArticleResponse], error)
	// list published articles
	ListPublishedArticles(context.Context, *connect_go.Request[newsroom.ListPublishedArticlesRequest]) (*connect_go.Response[newsroom.ListPublishedArticlesResponse], error)
	// get published article details by the id
	GetPublishedArticleById(context.Context, *connect_go.Request[newsroom.GetPublishedArticleByIdRequest]) (*connect_go.Response[newsroom.GetPublishedArticleByIdResponse], error)
	// user activity updates
	UserActivity(context.Context, *connect_go.Request[newsroom.UserActivityRequest]) (*connect_go.Response[newsroom.UserActivityResponse], error)
	// fetch the unseen articles for the user
	GetNewsForUser(context.Context, *connect_go.Request[newsroom.GetNewsForUserRequest]) (*connect_go.Response[newsroom.GetNewsForUserResponse], error)
	// upload newsroom image for the news article
	StoreNewsArticleImage(context.Context, *connect_go.Request[newsroom.StoreNewsArticleImageRequest]) (*connect_go.Response[newsroom.StoreNewsArticleImageResponse], error)
	// list newsroom images
	ListImagesForNewsArticle(context.Context, *connect_go.Request[newsroom.ListImagesForNewsArticleRequest]) (*connect_go.Response[newsroom.ListImagesForNewsArticleResponse], error)
	// upload newsroom image for the news article
	UploadNewsArticleImage(context.Context, *connect_go.Request[newsroom.UploadNewsArticleImageRequest]) (*connect_go.Response[newsroom.UploadNewsArticleImageResponse], error)
	// create a client managed news article
	CreateClientArticle(context.Context, *connect_go.Request[newsroom.CreateClientArticleRequest]) (*connect_go.Response[newsroom.CreateClientArticleResponse], error)
	// update a client managed news article
	UpdateClientArticle(context.Context, *connect_go.Request[newsroom.UpdateClientArticleRequest]) (*connect_go.Response[newsroom.UpdateClientArticleResponse], error)
	// list client managed news articles
	ListClientArticles(context.Context, *connect_go.Request[newsroom.ListClientArticlesRequest]) (*connect_go.Response[newsroom.ListClientArticlesResponse], error)
	// create published client article
	CreatePublishedClientArticle(context.Context, *connect_go.Request[newsroom.CreatePublishedClientArticleRequest]) (*connect_go.Response[newsroom.CreatePublishedClientArticleResponse], error)
	// get published client article details by the id
	GetPublishedClientArticleById(context.Context, *connect_go.Request[newsroom.GetPublishedClientArticleByIdRequest]) (*connect_go.Response[newsroom.GetPublishedClientArticleByIdResponse], error)
	// upload newsroom image for the client news article
	StoreClientArticleImage(context.Context, *connect_go.Request[newsroom.StoreClientArticleImageRequest]) (*connect_go.Response[newsroom.StoreClientArticleImageResponse], error)
	// list newsroom client images
	ListImagesForClientArticle(context.Context, *connect_go.Request[newsroom.ListImagesForClientArticleRequest]) (*connect_go.Response[newsroom.ListImagesForClientArticleResponse], error)
	// upload newsroom image for the client article
	UploadClientArticleImage(context.Context, *connect_go.Request[newsroom.UploadClientArticleImageRequest]) (*connect_go.Response[newsroom.UploadClientArticleImageResponse], error)
	// list published client articles
	ListPublishedClientArticles(context.Context, *connect_go.Request[newsroom.ListPublishedClientArticlesRequest]) (*connect_go.Response[newsroom.ListPublishedClientArticlesResponse], error)
	// get client article details by the id
	GetClientArticleById(context.Context, *connect_go.Request[newsroom.GetClientArticleByIdRequest]) (*connect_go.Response[newsroom.GetClientArticleByIdResponse], error)
}

NewsroomAPIClient is a client for the api.v1alpha1.newsroom.NewsroomAPI service.

func NewNewsroomAPIClient

func NewNewsroomAPIClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) NewsroomAPIClient

NewNewsroomAPIClient constructs a client for the api.v1alpha1.newsroom.NewsroomAPI service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type NewsroomAPIHandler

type NewsroomAPIHandler interface {
	// create news article
	CreateNewsArticle(context.Context, *connect_go.Request[newsroom.CreateNewsArticleRequest]) (*connect_go.Response[newsroom.CreateNewsArticleResponse], error)
	// list news articles
	ListNewsArticles(context.Context, *connect_go.Request[newsroom.ListNewsArticlesRequest]) (*connect_go.Response[newsroom.ListNewsArticlesResponse], error)
	// get news article details by the id
	GetNewsArticleById(context.Context, *connect_go.Request[newsroom.GetNewsArticleByIdRequest]) (*connect_go.Response[newsroom.GetNewsArticleByIdResponse], error)
	// update news article
	UpdateNewsArticle(context.Context, *connect_go.Request[newsroom.UpdateNewsArticleRequest]) (*connect_go.Response[newsroom.UpdateNewsArticleResponse], error)
	// create published article
	CreatePublishedArticle(context.Context, *connect_go.Request[newsroom.CreatePublishedArticleRequest]) (*connect_go.Response[newsroom.CreatePublishedArticleResponse], error)
	// list published articles
	ListPublishedArticles(context.Context, *connect_go.Request[newsroom.ListPublishedArticlesRequest]) (*connect_go.Response[newsroom.ListPublishedArticlesResponse], error)
	// get published article details by the id
	GetPublishedArticleById(context.Context, *connect_go.Request[newsroom.GetPublishedArticleByIdRequest]) (*connect_go.Response[newsroom.GetPublishedArticleByIdResponse], error)
	// user activity updates
	UserActivity(context.Context, *connect_go.Request[newsroom.UserActivityRequest]) (*connect_go.Response[newsroom.UserActivityResponse], error)
	// fetch the unseen articles for the user
	GetNewsForUser(context.Context, *connect_go.Request[newsroom.GetNewsForUserRequest]) (*connect_go.Response[newsroom.GetNewsForUserResponse], error)
	// upload newsroom image for the news article
	StoreNewsArticleImage(context.Context, *connect_go.Request[newsroom.StoreNewsArticleImageRequest]) (*connect_go.Response[newsroom.StoreNewsArticleImageResponse], error)
	// list newsroom images
	ListImagesForNewsArticle(context.Context, *connect_go.Request[newsroom.ListImagesForNewsArticleRequest]) (*connect_go.Response[newsroom.ListImagesForNewsArticleResponse], error)
	// upload newsroom image for the news article
	UploadNewsArticleImage(context.Context, *connect_go.Request[newsroom.UploadNewsArticleImageRequest]) (*connect_go.Response[newsroom.UploadNewsArticleImageResponse], error)
	// create a client managed news article
	CreateClientArticle(context.Context, *connect_go.Request[newsroom.CreateClientArticleRequest]) (*connect_go.Response[newsroom.CreateClientArticleResponse], error)
	// update a client managed news article
	UpdateClientArticle(context.Context, *connect_go.Request[newsroom.UpdateClientArticleRequest]) (*connect_go.Response[newsroom.UpdateClientArticleResponse], error)
	// list client managed news articles
	ListClientArticles(context.Context, *connect_go.Request[newsroom.ListClientArticlesRequest]) (*connect_go.Response[newsroom.ListClientArticlesResponse], error)
	// create published client article
	CreatePublishedClientArticle(context.Context, *connect_go.Request[newsroom.CreatePublishedClientArticleRequest]) (*connect_go.Response[newsroom.CreatePublishedClientArticleResponse], error)
	// get published client article details by the id
	GetPublishedClientArticleById(context.Context, *connect_go.Request[newsroom.GetPublishedClientArticleByIdRequest]) (*connect_go.Response[newsroom.GetPublishedClientArticleByIdResponse], error)
	// upload newsroom image for the client news article
	StoreClientArticleImage(context.Context, *connect_go.Request[newsroom.StoreClientArticleImageRequest]) (*connect_go.Response[newsroom.StoreClientArticleImageResponse], error)
	// list newsroom client images
	ListImagesForClientArticle(context.Context, *connect_go.Request[newsroom.ListImagesForClientArticleRequest]) (*connect_go.Response[newsroom.ListImagesForClientArticleResponse], error)
	// upload newsroom image for the client article
	UploadClientArticleImage(context.Context, *connect_go.Request[newsroom.UploadClientArticleImageRequest]) (*connect_go.Response[newsroom.UploadClientArticleImageResponse], error)
	// list published client articles
	ListPublishedClientArticles(context.Context, *connect_go.Request[newsroom.ListPublishedClientArticlesRequest]) (*connect_go.Response[newsroom.ListPublishedClientArticlesResponse], error)
	// get client article details by the id
	GetClientArticleById(context.Context, *connect_go.Request[newsroom.GetClientArticleByIdRequest]) (*connect_go.Response[newsroom.GetClientArticleByIdResponse], error)
}

NewsroomAPIHandler is an implementation of the api.v1alpha1.newsroom.NewsroomAPI service.

type UnimplementedNewsroomAPIHandler

type UnimplementedNewsroomAPIHandler struct{}

UnimplementedNewsroomAPIHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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