Documentation ¶
Index ¶
- Constants
- func NewConfigServiceHandler(svc ConfigServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type ConfigServiceClient
- type ConfigServiceHandler
- type UnimplementedConfigServiceHandler
- func (UnimplementedConfigServiceHandler) GetAnnouncements(context.Context, *connect.Request[config_service.GetAnnouncementsRequest]) (*connect.Response[config_service.AnnouncementsResponse], error)
- func (UnimplementedConfigServiceHandler) GetUserDetails(context.Context, *connect.Request[config_service.UserRequest]) (*connect.Response[config_service.UserResponse], error)
- func (UnimplementedConfigServiceHandler) SetAnnouncements(context.Context, *connect.Request[config_service.SetAnnouncementsRequest]) (*connect.Response[config_service.ConfigResponse], error)
- func (UnimplementedConfigServiceHandler) SetFEHash(context.Context, *connect.Request[config_service.SetFEHashRequest]) (*connect.Response[config_service.ConfigResponse], error)
- func (UnimplementedConfigServiceHandler) SetGamesEnabled(context.Context, *connect.Request[config_service.EnableGamesRequest]) (*connect.Response[config_service.ConfigResponse], error)
- func (UnimplementedConfigServiceHandler) SetSingleAnnouncement(context.Context, *connect.Request[config_service.SetSingleAnnouncementRequest]) (*connect.Response[config_service.ConfigResponse], error)
- func (UnimplementedConfigServiceHandler) SetUserPermissions(context.Context, *connect.Request[config_service.PermissionsRequest]) (*connect.Response[config_service.ConfigResponse], error)
Constants ¶
const ( // ConfigServiceSetGamesEnabledProcedure is the fully-qualified name of the ConfigService's // SetGamesEnabled RPC. ConfigServiceSetGamesEnabledProcedure = "/config_service.ConfigService/SetGamesEnabled" // ConfigServiceSetFEHashProcedure is the fully-qualified name of the ConfigService's SetFEHash RPC. ConfigServiceSetFEHashProcedure = "/config_service.ConfigService/SetFEHash" // ConfigServiceSetUserPermissionsProcedure is the fully-qualified name of the ConfigService's // SetUserPermissions RPC. ConfigServiceSetUserPermissionsProcedure = "/config_service.ConfigService/SetUserPermissions" // ConfigServiceGetUserDetailsProcedure is the fully-qualified name of the ConfigService's // GetUserDetails RPC. ConfigServiceGetUserDetailsProcedure = "/config_service.ConfigService/GetUserDetails" // ConfigServiceSetAnnouncementsProcedure is the fully-qualified name of the ConfigService's // SetAnnouncements RPC. ConfigServiceSetAnnouncementsProcedure = "/config_service.ConfigService/SetAnnouncements" // ConfigServiceGetAnnouncementsProcedure is the fully-qualified name of the ConfigService's // GetAnnouncements RPC. ConfigServiceGetAnnouncementsProcedure = "/config_service.ConfigService/GetAnnouncements" // ConfigServiceSetSingleAnnouncementProcedure is the fully-qualified name of the ConfigService's // SetSingleAnnouncement RPC. ConfigServiceSetSingleAnnouncementProcedure = "/config_service.ConfigService/SetSingleAnnouncement" )
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.
const (
// ConfigServiceName is the fully-qualified name of the ConfigService service.
ConfigServiceName = "config_service.ConfigService"
)
Variables ¶
This section is empty.
Functions ¶
func NewConfigServiceHandler ¶
func NewConfigServiceHandler(svc ConfigServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewConfigServiceHandler 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 ConfigServiceClient ¶
type ConfigServiceClient interface { SetGamesEnabled(context.Context, *connect.Request[config_service.EnableGamesRequest]) (*connect.Response[config_service.ConfigResponse], error) SetFEHash(context.Context, *connect.Request[config_service.SetFEHashRequest]) (*connect.Response[config_service.ConfigResponse], error) SetUserPermissions(context.Context, *connect.Request[config_service.PermissionsRequest]) (*connect.Response[config_service.ConfigResponse], error) GetUserDetails(context.Context, *connect.Request[config_service.UserRequest]) (*connect.Response[config_service.UserResponse], error) SetAnnouncements(context.Context, *connect.Request[config_service.SetAnnouncementsRequest]) (*connect.Response[config_service.ConfigResponse], error) GetAnnouncements(context.Context, *connect.Request[config_service.GetAnnouncementsRequest]) (*connect.Response[config_service.AnnouncementsResponse], error) SetSingleAnnouncement(context.Context, *connect.Request[config_service.SetSingleAnnouncementRequest]) (*connect.Response[config_service.ConfigResponse], error) }
ConfigServiceClient is a client for the config_service.ConfigService service.
func NewConfigServiceClient ¶
func NewConfigServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ConfigServiceClient
NewConfigServiceClient constructs a client for the config_service.ConfigService 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 ConfigServiceHandler ¶
type ConfigServiceHandler interface { SetGamesEnabled(context.Context, *connect.Request[config_service.EnableGamesRequest]) (*connect.Response[config_service.ConfigResponse], error) SetFEHash(context.Context, *connect.Request[config_service.SetFEHashRequest]) (*connect.Response[config_service.ConfigResponse], error) SetUserPermissions(context.Context, *connect.Request[config_service.PermissionsRequest]) (*connect.Response[config_service.ConfigResponse], error) GetUserDetails(context.Context, *connect.Request[config_service.UserRequest]) (*connect.Response[config_service.UserResponse], error) SetAnnouncements(context.Context, *connect.Request[config_service.SetAnnouncementsRequest]) (*connect.Response[config_service.ConfigResponse], error) GetAnnouncements(context.Context, *connect.Request[config_service.GetAnnouncementsRequest]) (*connect.Response[config_service.AnnouncementsResponse], error) SetSingleAnnouncement(context.Context, *connect.Request[config_service.SetSingleAnnouncementRequest]) (*connect.Response[config_service.ConfigResponse], error) }
ConfigServiceHandler is an implementation of the config_service.ConfigService service.
type UnimplementedConfigServiceHandler ¶
type UnimplementedConfigServiceHandler struct{}
UnimplementedConfigServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedConfigServiceHandler) GetAnnouncements ¶
func (UnimplementedConfigServiceHandler) GetAnnouncements(context.Context, *connect.Request[config_service.GetAnnouncementsRequest]) (*connect.Response[config_service.AnnouncementsResponse], error)
func (UnimplementedConfigServiceHandler) GetUserDetails ¶
func (UnimplementedConfigServiceHandler) GetUserDetails(context.Context, *connect.Request[config_service.UserRequest]) (*connect.Response[config_service.UserResponse], error)
func (UnimplementedConfigServiceHandler) SetAnnouncements ¶
func (UnimplementedConfigServiceHandler) SetAnnouncements(context.Context, *connect.Request[config_service.SetAnnouncementsRequest]) (*connect.Response[config_service.ConfigResponse], error)
func (UnimplementedConfigServiceHandler) SetFEHash ¶
func (UnimplementedConfigServiceHandler) SetFEHash(context.Context, *connect.Request[config_service.SetFEHashRequest]) (*connect.Response[config_service.ConfigResponse], error)
func (UnimplementedConfigServiceHandler) SetGamesEnabled ¶
func (UnimplementedConfigServiceHandler) SetGamesEnabled(context.Context, *connect.Request[config_service.EnableGamesRequest]) (*connect.Response[config_service.ConfigResponse], error)
func (UnimplementedConfigServiceHandler) SetSingleAnnouncement ¶
func (UnimplementedConfigServiceHandler) SetSingleAnnouncement(context.Context, *connect.Request[config_service.SetSingleAnnouncementRequest]) (*connect.Response[config_service.ConfigResponse], error)
func (UnimplementedConfigServiceHandler) SetUserPermissions ¶
func (UnimplementedConfigServiceHandler) SetUserPermissions(context.Context, *connect.Request[config_service.PermissionsRequest]) (*connect.Response[config_service.ConfigResponse], error)