v1

package
v0.0.44 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var File_vince_api_v1_api_proto protoreflect.FileDescriptor
View Source
var Vince_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1.Vince",
	HandlerType: (*VinceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Version",
			Handler:    _Vince_Version_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "vince/api/v1/api.proto",
}

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

Functions

func RegisterVinceHandler

func RegisterVinceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterVinceHandler registers the http handlers for service Vince to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterVinceHandlerClient

func RegisterVinceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VinceClient) error

RegisterVinceHandlerClient registers the http handlers for service Vince to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "VinceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "VinceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "VinceClient" to call the correct interceptors.

func RegisterVinceHandlerFromEndpoint

func RegisterVinceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterVinceHandlerFromEndpoint is same as RegisterVinceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterVinceHandlerServer

func RegisterVinceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VinceServer) error

RegisterVinceHandlerServer registers the http handlers for service Vince to "mux". UnaryRPC :call VinceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterVinceHandlerFromEndpoint instead.

func RegisterVinceServer

func RegisterVinceServer(s grpc.ServiceRegistrar, srv VinceServer)

Types

type Account

type Account struct {
	Name           string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	HashedPassword []byte `protobuf:"bytes,2,opt,name=hashed_password,json=hashedPassword,proto3" json:"hashed_password,omitempty"`
	// contains filtered or unexported fields
}

func (*Account) Descriptor deprecated

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

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetHashedPassword

func (x *Account) GetHashedPassword() []byte

func (*Account) GetName

func (x *Account) GetName() string

func (*Account) MarshalToSizedBufferVT

func (m *Account) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Account) MarshalToVT

func (m *Account) MarshalToVT(dAtA []byte) (int, error)

func (*Account) MarshalVT

func (m *Account) MarshalVT() (dAtA []byte, err error)

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

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

func (*Account) Reset

func (x *Account) Reset()

func (*Account) SizeVT

func (m *Account) SizeVT() (n int)

func (*Account) String

func (x *Account) String() string

func (*Account) UnmarshalVT

func (m *Account) UnmarshalVT(dAtA []byte) error

type Error

type Error struct {
	Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	Code  int32  `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() int32

func (*Error) GetError

func (x *Error) GetError() string

func (*Error) MarshalToSizedBufferVT

func (m *Error) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Error) MarshalToVT

func (m *Error) MarshalToVT(dAtA []byte) (int, error)

func (*Error) MarshalVT

func (m *Error) MarshalVT() (dAtA []byte, err error)

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) SizeVT

func (m *Error) SizeVT() (n int)

func (*Error) String

func (x *Error) String() string

func (*Error) UnmarshalVT

func (m *Error) UnmarshalVT(dAtA []byte) error

type Notice

type Notice struct {
	// contains filtered or unexported fields
}

func (*Notice) Descriptor deprecated

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

Deprecated: Use Notice.ProtoReflect.Descriptor instead.

func (*Notice) MarshalToSizedBufferVT

func (m *Notice) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Notice) MarshalToVT

func (m *Notice) MarshalToVT(dAtA []byte) (int, error)

func (*Notice) MarshalVT

func (m *Notice) MarshalVT() (dAtA []byte, err error)

func (*Notice) ProtoMessage

func (*Notice) ProtoMessage()

func (*Notice) ProtoReflect

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

func (*Notice) Reset

func (x *Notice) Reset()

func (*Notice) SizeVT

func (m *Notice) SizeVT() (n int)

func (*Notice) String

func (x *Notice) String() string

func (*Notice) UnmarshalVT

func (m *Notice) UnmarshalVT(dAtA []byte) error

type Status

type Status struct {
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

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

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) MarshalToSizedBufferVT

func (m *Status) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Status) MarshalToVT

func (m *Status) MarshalToVT(dAtA []byte) (int, error)

func (*Status) MarshalVT

func (m *Status) MarshalVT() (dAtA []byte, err error)

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

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

func (*Status) Reset

func (x *Status) Reset()

func (*Status) SizeVT

func (m *Status) SizeVT() (n int)

func (*Status) String

func (x *Status) String() string

func (*Status) UnmarshalVT

func (m *Status) UnmarshalVT(dAtA []byte) error

type UnimplementedVinceServer

type UnimplementedVinceServer struct {
}

UnimplementedVinceServer must be embedded to have forward compatible implementations.

func (UnimplementedVinceServer) Version added in v0.0.31

type UnsafeVinceServer

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

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

type VinceClient

type VinceClient interface {
	Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.Build, error)
}

VinceClient is the client API for Vince 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.

func NewVinceClient

func NewVinceClient(cc grpc.ClientConnInterface) VinceClient

type VinceServer

type VinceServer interface {
	Version(context.Context, *emptypb.Empty) (*v1.Build, error)
	// contains filtered or unexported methods
}

VinceServer is the server API for Vince service. All implementations must embed UnimplementedVinceServer for forward compatibility

Jump to

Keyboard shortcuts

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