v1

package
v1.62.4 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Service_Migrate_FullMethodName = "/migrieren.v1.Service/Migrate"
)

Variables

View Source
var File_migrieren_v1_service_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "migrieren.v1.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Migrate",
			Handler:    _Service_Migrate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "migrieren/v1/service.proto",
}

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

Functions

func RegisterServiceHandler

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

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

func RegisterServiceHandlerClient

func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error

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

func RegisterServiceHandlerFromEndpoint

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

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

func RegisterServiceHandlerServer

func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error

RegisterServiceHandlerServer registers the http handlers for service Service to "mux". UnaryRPC :call ServiceServer 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 RegisterServiceHandlerFromEndpoint instead.

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type MigrateRequest

type MigrateRequest struct {
	Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
	Version  uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

MigrateRequest for a specific database and version.

func (*MigrateRequest) Descriptor deprecated

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

Deprecated: Use MigrateRequest.ProtoReflect.Descriptor instead.

func (*MigrateRequest) GetDatabase

func (x *MigrateRequest) GetDatabase() string

func (*MigrateRequest) GetVersion

func (x *MigrateRequest) GetVersion() uint64

func (*MigrateRequest) ProtoMessage

func (*MigrateRequest) ProtoMessage()

func (*MigrateRequest) ProtoReflect

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

func (*MigrateRequest) Reset

func (x *MigrateRequest) Reset()

func (*MigrateRequest) String

func (x *MigrateRequest) String() string

type MigrateResponse

type MigrateResponse struct {
	Meta      map[string]string `` /* 149-byte string literal not displayed */
	Migration *Migration        `protobuf:"bytes,2,opt,name=migration,proto3" json:"migration,omitempty"`
	// contains filtered or unexported fields
}

MigrateResponse for a specific database and version.

func (*MigrateResponse) Descriptor deprecated

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

Deprecated: Use MigrateResponse.ProtoReflect.Descriptor instead.

func (*MigrateResponse) GetMeta added in v1.26.0

func (x *MigrateResponse) GetMeta() map[string]string

func (*MigrateResponse) GetMigration

func (x *MigrateResponse) GetMigration() *Migration

func (*MigrateResponse) ProtoMessage

func (*MigrateResponse) ProtoMessage()

func (*MigrateResponse) ProtoReflect

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

func (*MigrateResponse) Reset

func (x *MigrateResponse) Reset()

func (*MigrateResponse) String

func (x *MigrateResponse) String() string

type Migration

type Migration struct {
	Database string   `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
	Version  uint64   `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	Logs     []string `protobuf:"bytes,3,rep,name=logs,proto3" json:"logs,omitempty"`
	// contains filtered or unexported fields
}

Migration for a specific database and version with logs.

func (*Migration) Descriptor deprecated

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

Deprecated: Use Migration.ProtoReflect.Descriptor instead.

func (*Migration) GetDatabase

func (x *Migration) GetDatabase() string

func (*Migration) GetLogs

func (x *Migration) GetLogs() []string

func (*Migration) GetVersion

func (x *Migration) GetVersion() uint64

func (*Migration) ProtoMessage

func (*Migration) ProtoMessage()

func (*Migration) ProtoReflect

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

func (*Migration) Reset

func (x *Migration) Reset()

func (*Migration) String

func (x *Migration) String() string

type ServiceClient

type ServiceClient interface {
	// Migrate a specific database to version.
	Migrate(ctx context.Context, in *MigrateRequest, opts ...grpc.CallOption) (*MigrateResponse, error)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	// Migrate a specific database to version.
	Migrate(context.Context, *MigrateRequest) (*MigrateResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) Migrate

type UnsafeServiceServer

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

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

Jump to

Keyboard shortcuts

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