apiv1

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package apiv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	D14NMigrationApi_FetchD14NCutover_FullMethodName = "/xmtp.migration.api.v1.D14nMigrationApi/FetchD14nCutover"
)

Variables

View Source
var D14NMigrationApi_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "xmtp.migration.api.v1.D14nMigrationApi",
	HandlerType: (*D14NMigrationApiServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "FetchD14nCutover",
			Handler:    _D14NMigrationApi_FetchD14NCutover_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "migration/api/v1/migration.proto",
}

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

View Source
var File_migration_api_v1_migration_proto protoreflect.FileDescriptor

Functions

func RegisterD14NMigrationApiHandler

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

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

func RegisterD14NMigrationApiHandlerClient

func RegisterD14NMigrationApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client D14NMigrationApiClient) error

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

func RegisterD14NMigrationApiHandlerFromEndpoint

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

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

func RegisterD14NMigrationApiHandlerServer

func RegisterD14NMigrationApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server D14NMigrationApiServer) error

RegisterD14NMigrationApiHandlerServer registers the http handlers for service D14NMigrationApi to "mux". UnaryRPC :call D14NMigrationApiServer 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 RegisterD14NMigrationApiHandlerFromEndpoint instead.

func RegisterD14NMigrationApiServer

func RegisterD14NMigrationApiServer(s grpc.ServiceRegistrar, srv D14NMigrationApiServer)

Types

type D14NMigrationApiClient

type D14NMigrationApiClient interface {
	FetchD14NCutover(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FetchD14NCutoverResponse, error)
}

D14NMigrationApiClient is the client API for D14NMigrationApi 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 D14NMigrationApiServer

type D14NMigrationApiServer interface {
	FetchD14NCutover(context.Context, *emptypb.Empty) (*FetchD14NCutoverResponse, error)
	// contains filtered or unexported methods
}

D14NMigrationApiServer is the server API for D14NMigrationApi service. All implementations must embed UnimplementedD14NMigrationApiServer for forward compatibility

type FetchD14NCutoverResponse

type FetchD14NCutoverResponse struct {

	// the unix timestamp at which point d14n becomes the canonical backend
	TimestampNs uint64 `protobuf:"varint,1,opt,name=timestamp_ns,json=timestampNs,proto3" json:"timestamp_ns,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchD14NCutoverResponse) Descriptor deprecated

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

Deprecated: Use FetchD14NCutoverResponse.ProtoReflect.Descriptor instead.

func (*FetchD14NCutoverResponse) GetTimestampNs

func (x *FetchD14NCutoverResponse) GetTimestampNs() uint64

func (*FetchD14NCutoverResponse) ProtoMessage

func (*FetchD14NCutoverResponse) ProtoMessage()

func (*FetchD14NCutoverResponse) ProtoReflect

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

func (*FetchD14NCutoverResponse) Reset

func (x *FetchD14NCutoverResponse) Reset()

func (*FetchD14NCutoverResponse) String

func (x *FetchD14NCutoverResponse) String() string

type UnimplementedD14NMigrationApiServer

type UnimplementedD14NMigrationApiServer struct {
}

UnimplementedD14NMigrationApiServer must be embedded to have forward compatible implementations.

func (UnimplementedD14NMigrationApiServer) FetchD14NCutover

type UnsafeD14NMigrationApiServer

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

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

Jump to

Keyboard shortcuts

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