cli/azd/pkg/azdext/user_config_grpc.pb.go (221 lines of code) (raw):
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v5.29.1
// source: user_config.proto
package azdext
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
UserConfigService_Get_FullMethodName = "/azdext.UserConfigService/Get"
UserConfigService_GetString_FullMethodName = "/azdext.UserConfigService/GetString"
UserConfigService_GetSection_FullMethodName = "/azdext.UserConfigService/GetSection"
UserConfigService_Set_FullMethodName = "/azdext.UserConfigService/Set"
UserConfigService_Unset_FullMethodName = "/azdext.UserConfigService/Unset"
)
// UserConfigServiceClient is the client API for UserConfigService 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 UserConfigServiceClient interface {
// Get retrieves a value by path
Get(ctx context.Context, in *GetUserConfigRequest, opts ...grpc.CallOption) (*GetUserConfigResponse, error)
// GetString retrieves a value by path and returns it as a string
GetString(ctx context.Context, in *GetUserConfigStringRequest, opts ...grpc.CallOption) (*GetUserConfigStringResponse, error)
// GetSection retrieves a section by path
GetSection(ctx context.Context, in *GetUserConfigSectionRequest, opts ...grpc.CallOption) (*GetUserConfigSectionResponse, error)
// Set sets a value at a given path
Set(ctx context.Context, in *SetUserConfigRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
// Unset removes a value at a given path
Unset(ctx context.Context, in *UnsetUserConfigRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
}
type userConfigServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUserConfigServiceClient(cc grpc.ClientConnInterface) UserConfigServiceClient {
return &userConfigServiceClient{cc}
}
func (c *userConfigServiceClient) Get(ctx context.Context, in *GetUserConfigRequest, opts ...grpc.CallOption) (*GetUserConfigResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetUserConfigResponse)
err := c.cc.Invoke(ctx, UserConfigService_Get_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userConfigServiceClient) GetString(ctx context.Context, in *GetUserConfigStringRequest, opts ...grpc.CallOption) (*GetUserConfigStringResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetUserConfigStringResponse)
err := c.cc.Invoke(ctx, UserConfigService_GetString_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userConfigServiceClient) GetSection(ctx context.Context, in *GetUserConfigSectionRequest, opts ...grpc.CallOption) (*GetUserConfigSectionResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetUserConfigSectionResponse)
err := c.cc.Invoke(ctx, UserConfigService_GetSection_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userConfigServiceClient) Set(ctx context.Context, in *SetUserConfigRequest, opts ...grpc.CallOption) (*EmptyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(EmptyResponse)
err := c.cc.Invoke(ctx, UserConfigService_Set_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userConfigServiceClient) Unset(ctx context.Context, in *UnsetUserConfigRequest, opts ...grpc.CallOption) (*EmptyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(EmptyResponse)
err := c.cc.Invoke(ctx, UserConfigService_Unset_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserConfigServiceServer is the server API for UserConfigService service.
// All implementations must embed UnimplementedUserConfigServiceServer
// for forward compatibility.
type UserConfigServiceServer interface {
// Get retrieves a value by path
Get(context.Context, *GetUserConfigRequest) (*GetUserConfigResponse, error)
// GetString retrieves a value by path and returns it as a string
GetString(context.Context, *GetUserConfigStringRequest) (*GetUserConfigStringResponse, error)
// GetSection retrieves a section by path
GetSection(context.Context, *GetUserConfigSectionRequest) (*GetUserConfigSectionResponse, error)
// Set sets a value at a given path
Set(context.Context, *SetUserConfigRequest) (*EmptyResponse, error)
// Unset removes a value at a given path
Unset(context.Context, *UnsetUserConfigRequest) (*EmptyResponse, error)
mustEmbedUnimplementedUserConfigServiceServer()
}
// UnimplementedUserConfigServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedUserConfigServiceServer struct{}
func (UnimplementedUserConfigServiceServer) Get(context.Context, *GetUserConfigRequest) (*GetUserConfigResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedUserConfigServiceServer) GetString(context.Context, *GetUserConfigStringRequest) (*GetUserConfigStringResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetString not implemented")
}
func (UnimplementedUserConfigServiceServer) GetSection(context.Context, *GetUserConfigSectionRequest) (*GetUserConfigSectionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSection not implemented")
}
func (UnimplementedUserConfigServiceServer) Set(context.Context, *SetUserConfigRequest) (*EmptyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Set not implemented")
}
func (UnimplementedUserConfigServiceServer) Unset(context.Context, *UnsetUserConfigRequest) (*EmptyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Unset not implemented")
}
func (UnimplementedUserConfigServiceServer) mustEmbedUnimplementedUserConfigServiceServer() {}
func (UnimplementedUserConfigServiceServer) testEmbeddedByValue() {}
// UnsafeUserConfigServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserConfigServiceServer will
// result in compilation errors.
type UnsafeUserConfigServiceServer interface {
mustEmbedUnimplementedUserConfigServiceServer()
}
func RegisterUserConfigServiceServer(s grpc.ServiceRegistrar, srv UserConfigServiceServer) {
// If the following call pancis, it indicates UnimplementedUserConfigServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&UserConfigService_ServiceDesc, srv)
}
func _UserConfigService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserConfigRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserConfigServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserConfigService_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserConfigServiceServer).Get(ctx, req.(*GetUserConfigRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserConfigService_GetString_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserConfigStringRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserConfigServiceServer).GetString(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserConfigService_GetString_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserConfigServiceServer).GetString(ctx, req.(*GetUserConfigStringRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserConfigService_GetSection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserConfigSectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserConfigServiceServer).GetSection(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserConfigService_GetSection_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserConfigServiceServer).GetSection(ctx, req.(*GetUserConfigSectionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserConfigService_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetUserConfigRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserConfigServiceServer).Set(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserConfigService_Set_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserConfigServiceServer).Set(ctx, req.(*SetUserConfigRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserConfigService_Unset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UnsetUserConfigRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserConfigServiceServer).Unset(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserConfigService_Unset_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserConfigServiceServer).Unset(ctx, req.(*UnsetUserConfigRequest))
}
return interceptor(ctx, in, info, handler)
}
// UserConfigService_ServiceDesc is the grpc.ServiceDesc for UserConfigService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserConfigService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "azdext.UserConfigService",
HandlerType: (*UserConfigServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _UserConfigService_Get_Handler,
},
{
MethodName: "GetString",
Handler: _UserConfigService_GetString_Handler,
},
{
MethodName: "GetSection",
Handler: _UserConfigService_GetSection_Handler,
},
{
MethodName: "Set",
Handler: _UserConfigService_Set_Handler,
},
{
MethodName: "Unset",
Handler: _UserConfigService_Unset_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "user_config.proto",
}