bffv1pbconnect

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModerationServicePingProcedure is the fully-qualified name of the ModerationService's Ping RPC.
	ModerationServicePingProcedure = "/bff.v1.ModerationService/Ping"
	// ModerationServiceProcessApprovalQueueProcedure is the fully-qualified name of the
	// ModerationService's ProcessApprovalQueue RPC.
	ModerationServiceProcessApprovalQueueProcedure = "/bff.v1.ModerationService/ProcessApprovalQueue"
	// ModerationServiceListActorsProcedure is the fully-qualified name of the ModerationService's
	// ListActors RPC.
	ModerationServiceListActorsProcedure = "/bff.v1.ModerationService/ListActors"
	// ModerationServiceGetActorProcedure is the fully-qualified name of the ModerationService's
	// GetActor RPC.
	ModerationServiceGetActorProcedure = "/bff.v1.ModerationService/GetActor"
	// ModerationServiceBanActorProcedure is the fully-qualified name of the ModerationService's
	// BanActor RPC.
	ModerationServiceBanActorProcedure = "/bff.v1.ModerationService/BanActor"
	// ModerationServiceUnapproveActorProcedure is the fully-qualified name of the ModerationService's
	// UnapproveActor RPC.
	ModerationServiceUnapproveActorProcedure = "/bff.v1.ModerationService/UnapproveActor"
	// ModerationServiceForceApproveActorProcedure is the fully-qualified name of the
	// ModerationService's ForceApproveActor RPC.
	ModerationServiceForceApproveActorProcedure = "/bff.v1.ModerationService/ForceApproveActor"
	// ModerationServiceCreateActorProcedure is the fully-qualified name of the ModerationService's
	// CreateActor RPC.
	ModerationServiceCreateActorProcedure = "/bff.v1.ModerationService/CreateActor"
	// ModerationServiceListAuditEventsProcedure is the fully-qualified name of the ModerationService's
	// ListAuditEvents RPC.
	ModerationServiceListAuditEventsProcedure = "/bff.v1.ModerationService/ListAuditEvents"
	// ModerationServiceCreateCommentAuditEventProcedure is the fully-qualified name of the
	// ModerationService's CreateCommentAuditEvent RPC.
	ModerationServiceCreateCommentAuditEventProcedure = "/bff.v1.ModerationService/CreateCommentAuditEvent"
)

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 (
	// UserServiceGetMeProcedure is the fully-qualified name of the UserService's GetMe RPC.
	UserServiceGetMeProcedure = "/bff.v1.UserService/GetMe"
	// UserServiceJoinApprovalQueueProcedure is the fully-qualified name of the UserService's
	// JoinApprovalQueue RPC.
	UserServiceJoinApprovalQueueProcedure = "/bff.v1.UserService/JoinApprovalQueue"
)

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 (
	// ModerationServiceName is the fully-qualified name of the ModerationService service.
	ModerationServiceName = "bff.v1.ModerationService"
)
View Source
const (
	// PublicServiceListFeedsProcedure is the fully-qualified name of the PublicService's ListFeeds RPC.
	PublicServiceListFeedsProcedure = "/bff.v1.PublicService/ListFeeds"
)

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 (
	// PublicServiceName is the fully-qualified name of the PublicService service.
	PublicServiceName = "bff.v1.PublicService"
)
View Source
const (
	// UserServiceName is the fully-qualified name of the UserService service.
	UserServiceName = "bff.v1.UserService"
)

Variables

This section is empty.

Functions

func NewModerationServiceHandler

func NewModerationServiceHandler(svc ModerationServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewModerationServiceHandler 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.

func NewPublicServiceHandler added in v0.0.23

func NewPublicServiceHandler(svc PublicServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewPublicServiceHandler 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.

func NewUserServiceHandler added in v0.0.29

func NewUserServiceHandler(svc UserServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewUserServiceHandler 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 ModerationServiceClient

type ModerationServiceClient interface {
	// Ping is a test RPC that checks that the user is authenticated and then
	// returns an empty response. Ideal for health checking the moderation service.
	Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error)
	// TODO: Refactor ProcessApprovalQueue to something more like "ProcessPendingActor"
	ProcessApprovalQueue(context.Context, *connect.Request[v1.ProcessApprovalQueueRequest]) (*connect.Response[v1.ProcessApprovalQueueResponse], error)
	// ListActors fetches multiple actors from the database. It allows this to be
	// filtered by certain attributes.
	ListActors(context.Context, *connect.Request[v1.ListActorsRequest]) (*connect.Response[v1.ListActorsResponse], error)
	// GetActor fetches a single actor from the database.
	GetActor(context.Context, *connect.Request[v1.GetActorRequest]) (*connect.Response[v1.GetActorResponse], error)
	// BanActor changes an actors status to "banned".
	// Actor can be in any status before they are banned.
	BanActor(context.Context, *connect.Request[v1.BanActorRequest]) (*connect.Response[v1.BanActorResponse], error)
	// UnapproveActor changes an actor from "approved" status to "none" status.
	UnapproveActor(context.Context, *connect.Request[v1.UnapproveActorRequest]) (*connect.Response[v1.UnapproveActorResponse], error)
	// ForceApproveActor changes an actor to "approved" status from "none" or "pending".
	ForceApproveActor(context.Context, *connect.Request[v1.ForceApproveActorRequest]) (*connect.Response[v1.ForceApproveActorResponse], error)
	// CreateActor creates a database entry for an actor who does not currently exist.
	// By default, their status will be set to none.
	CreateActor(context.Context, *connect.Request[v1.CreateActorRequest]) (*connect.Response[v1.CreateActorResponse], error)
	ListAuditEvents(context.Context, *connect.Request[v1.ListAuditEventsRequest]) (*connect.Response[v1.ListAuditEventsResponse], error)
	CreateCommentAuditEvent(context.Context, *connect.Request[v1.CreateCommentAuditEventRequest]) (*connect.Response[v1.CreateCommentAuditEventResponse], error)
}

ModerationServiceClient is a client for the bff.v1.ModerationService service.

func NewModerationServiceClient

func NewModerationServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ModerationServiceClient

NewModerationServiceClient constructs a client for the bff.v1.ModerationService 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 ModerationServiceHandler

type ModerationServiceHandler interface {
	// Ping is a test RPC that checks that the user is authenticated and then
	// returns an empty response. Ideal for health checking the moderation service.
	Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error)
	// TODO: Refactor ProcessApprovalQueue to something more like "ProcessPendingActor"
	ProcessApprovalQueue(context.Context, *connect.Request[v1.ProcessApprovalQueueRequest]) (*connect.Response[v1.ProcessApprovalQueueResponse], error)
	// ListActors fetches multiple actors from the database. It allows this to be
	// filtered by certain attributes.
	ListActors(context.Context, *connect.Request[v1.ListActorsRequest]) (*connect.Response[v1.ListActorsResponse], error)
	// GetActor fetches a single actor from the database.
	GetActor(context.Context, *connect.Request[v1.GetActorRequest]) (*connect.Response[v1.GetActorResponse], error)
	// BanActor changes an actors status to "banned".
	// Actor can be in any status before they are banned.
	BanActor(context.Context, *connect.Request[v1.BanActorRequest]) (*connect.Response[v1.BanActorResponse], error)
	// UnapproveActor changes an actor from "approved" status to "none" status.
	UnapproveActor(context.Context, *connect.Request[v1.UnapproveActorRequest]) (*connect.Response[v1.UnapproveActorResponse], error)
	// ForceApproveActor changes an actor to "approved" status from "none" or "pending".
	ForceApproveActor(context.Context, *connect.Request[v1.ForceApproveActorRequest]) (*connect.Response[v1.ForceApproveActorResponse], error)
	// CreateActor creates a database entry for an actor who does not currently exist.
	// By default, their status will be set to none.
	CreateActor(context.Context, *connect.Request[v1.CreateActorRequest]) (*connect.Response[v1.CreateActorResponse], error)
	ListAuditEvents(context.Context, *connect.Request[v1.ListAuditEventsRequest]) (*connect.Response[v1.ListAuditEventsResponse], error)
	CreateCommentAuditEvent(context.Context, *connect.Request[v1.CreateCommentAuditEventRequest]) (*connect.Response[v1.CreateCommentAuditEventResponse], error)
}

ModerationServiceHandler is an implementation of the bff.v1.ModerationService service.

type PublicServiceClient added in v0.0.23

type PublicServiceClient interface {
	// ListFeeds returns a list of all feeds hosted by this server.
	ListFeeds(context.Context, *connect.Request[v1.ListFeedsRequest]) (*connect.Response[v1.ListFeedsResponse], error)
}

PublicServiceClient is a client for the bff.v1.PublicService service.

func NewPublicServiceClient added in v0.0.23

func NewPublicServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PublicServiceClient

NewPublicServiceClient constructs a client for the bff.v1.PublicService 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 PublicServiceHandler added in v0.0.23

type PublicServiceHandler interface {
	// ListFeeds returns a list of all feeds hosted by this server.
	ListFeeds(context.Context, *connect.Request[v1.ListFeedsRequest]) (*connect.Response[v1.ListFeedsResponse], error)
}

PublicServiceHandler is an implementation of the bff.v1.PublicService service.

type UnimplementedModerationServiceHandler

type UnimplementedModerationServiceHandler struct{}

UnimplementedModerationServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedModerationServiceHandler) BanActor added in v0.0.13

func (UnimplementedModerationServiceHandler) CreateActor added in v0.0.13

func (UnimplementedModerationServiceHandler) CreateCommentAuditEvent added in v0.0.11

func (UnimplementedModerationServiceHandler) ForceApproveActor added in v0.0.14

func (UnimplementedModerationServiceHandler) ListAuditEvents added in v0.0.11

func (UnimplementedModerationServiceHandler) Ping

func (UnimplementedModerationServiceHandler) UnapproveActor added in v0.0.13

type UnimplementedPublicServiceHandler added in v0.0.23

type UnimplementedPublicServiceHandler struct{}

UnimplementedPublicServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedPublicServiceHandler) ListFeeds added in v0.0.23

type UnimplementedUserServiceHandler added in v0.0.29

type UnimplementedUserServiceHandler struct{}

UnimplementedUserServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedUserServiceHandler) GetMe added in v0.0.29

func (UnimplementedUserServiceHandler) JoinApprovalQueue added in v0.0.29

type UserServiceClient added in v0.0.29

UserServiceClient is a client for the bff.v1.UserService service.

func NewUserServiceClient added in v0.0.29

func NewUserServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) UserServiceClient

NewUserServiceClient constructs a client for the bff.v1.UserService 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 UserServiceHandler added in v0.0.29

UserServiceHandler is an implementation of the bff.v1.UserService service.

Jump to

Keyboard shortcuts

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