v1

package
v3.49.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ValidationApi_ValidateKeyPackages_FullMethodName   = "/xmtp.mls_validation.v1.ValidationApi/ValidateKeyPackages"
	ValidationApi_ValidateGroupMessages_FullMethodName = "/xmtp.mls_validation.v1.ValidationApi/ValidateGroupMessages"
)

Variables

View Source
var File_mls_validation_v1_service_proto protoreflect.FileDescriptor
View Source
var ValidationApi_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "xmtp.mls_validation.v1.ValidationApi",
	HandlerType: (*ValidationApiServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ValidateKeyPackages",
			Handler:    _ValidationApi_ValidateKeyPackages_Handler,
		},
		{
			MethodName: "ValidateGroupMessages",
			Handler:    _ValidationApi_ValidateGroupMessages_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "mls_validation/v1/service.proto",
}

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

Functions

func RegisterValidationApiHandler

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

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

func RegisterValidationApiHandlerClient

func RegisterValidationApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ValidationApiClient) error

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

func RegisterValidationApiHandlerFromEndpoint

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

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

func RegisterValidationApiHandlerServer

func RegisterValidationApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ValidationApiServer) error

RegisterValidationApiHandlerServer registers the http handlers for service ValidationApi to "mux". UnaryRPC :call ValidationApiServer 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 RegisterValidationApiHandlerFromEndpoint instead.

func RegisterValidationApiServer

func RegisterValidationApiServer(s grpc.ServiceRegistrar, srv ValidationApiServer)

Types

type UnimplementedValidationApiServer

type UnimplementedValidationApiServer struct {
}

UnimplementedValidationApiServer must be embedded to have forward compatible implementations.

type UnsafeValidationApiServer

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

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

type ValidateGroupMessagesRequest

type ValidateGroupMessagesRequest struct {
	GroupMessages []*ValidateGroupMessagesRequest_GroupMessage `protobuf:"bytes,1,rep,name=group_messages,json=groupMessages,proto3" json:"group_messages,omitempty"`
	// contains filtered or unexported fields
}

Contains a batch of serialized Group Messages

func (*ValidateGroupMessagesRequest) Descriptor deprecated

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

Deprecated: Use ValidateGroupMessagesRequest.ProtoReflect.Descriptor instead.

func (*ValidateGroupMessagesRequest) GetGroupMessages

func (*ValidateGroupMessagesRequest) ProtoMessage

func (*ValidateGroupMessagesRequest) ProtoMessage()

func (*ValidateGroupMessagesRequest) ProtoReflect

func (*ValidateGroupMessagesRequest) Reset

func (x *ValidateGroupMessagesRequest) Reset()

func (*ValidateGroupMessagesRequest) String

type ValidateGroupMessagesRequest_GroupMessage

type ValidateGroupMessagesRequest_GroupMessage struct {
	GroupMessageBytesTlsSerialized []byte `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

Wrapper for each message

func (*ValidateGroupMessagesRequest_GroupMessage) Descriptor deprecated

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

Deprecated: Use ValidateGroupMessagesRequest_GroupMessage.ProtoReflect.Descriptor instead.

func (*ValidateGroupMessagesRequest_GroupMessage) GetGroupMessageBytesTlsSerialized

func (x *ValidateGroupMessagesRequest_GroupMessage) GetGroupMessageBytesTlsSerialized() []byte

func (*ValidateGroupMessagesRequest_GroupMessage) ProtoMessage

func (*ValidateGroupMessagesRequest_GroupMessage) ProtoReflect

func (*ValidateGroupMessagesRequest_GroupMessage) Reset

func (*ValidateGroupMessagesRequest_GroupMessage) String

type ValidateGroupMessagesResponse

type ValidateGroupMessagesResponse struct {
	Responses []*ValidateGroupMessagesResponse_ValidationResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
	// contains filtered or unexported fields
}

Response to ValidateGroupMessagesRequest

func (*ValidateGroupMessagesResponse) Descriptor deprecated

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

Deprecated: Use ValidateGroupMessagesResponse.ProtoReflect.Descriptor instead.

func (*ValidateGroupMessagesResponse) GetResponses

func (*ValidateGroupMessagesResponse) ProtoMessage

func (*ValidateGroupMessagesResponse) ProtoMessage()

func (*ValidateGroupMessagesResponse) ProtoReflect

func (*ValidateGroupMessagesResponse) Reset

func (x *ValidateGroupMessagesResponse) Reset()

func (*ValidateGroupMessagesResponse) String

type ValidateGroupMessagesResponse_ValidationResponse

type ValidateGroupMessagesResponse_ValidationResponse struct {
	IsOk         bool   `protobuf:"varint,1,opt,name=is_ok,json=isOk,proto3" json:"is_ok,omitempty"`
	ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	GroupId      string `protobuf:"bytes,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// contains filtered or unexported fields
}

An individual response to one message

func (*ValidateGroupMessagesResponse_ValidationResponse) Descriptor deprecated

Deprecated: Use ValidateGroupMessagesResponse_ValidationResponse.ProtoReflect.Descriptor instead.

func (*ValidateGroupMessagesResponse_ValidationResponse) GetErrorMessage

func (*ValidateGroupMessagesResponse_ValidationResponse) GetGroupId

func (*ValidateGroupMessagesResponse_ValidationResponse) GetIsOk

func (*ValidateGroupMessagesResponse_ValidationResponse) ProtoMessage

func (*ValidateGroupMessagesResponse_ValidationResponse) ProtoReflect

func (*ValidateGroupMessagesResponse_ValidationResponse) Reset

func (*ValidateGroupMessagesResponse_ValidationResponse) String

type ValidateKeyPackagesRequest

type ValidateKeyPackagesRequest struct {
	KeyPackages []*ValidateKeyPackagesRequest_KeyPackage `protobuf:"bytes,1,rep,name=key_packages,json=keyPackages,proto3" json:"key_packages,omitempty"`
	// contains filtered or unexported fields
}

Contains a batch of serialized Key Packages

func (*ValidateKeyPackagesRequest) Descriptor deprecated

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

Deprecated: Use ValidateKeyPackagesRequest.ProtoReflect.Descriptor instead.

func (*ValidateKeyPackagesRequest) GetKeyPackages

func (*ValidateKeyPackagesRequest) ProtoMessage

func (*ValidateKeyPackagesRequest) ProtoMessage()

func (*ValidateKeyPackagesRequest) ProtoReflect

func (*ValidateKeyPackagesRequest) Reset

func (x *ValidateKeyPackagesRequest) Reset()

func (*ValidateKeyPackagesRequest) String

func (x *ValidateKeyPackagesRequest) String() string

type ValidateKeyPackagesRequest_KeyPackage

type ValidateKeyPackagesRequest_KeyPackage struct {
	KeyPackageBytesTlsSerialized []byte `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

Wrapper for each key package

func (*ValidateKeyPackagesRequest_KeyPackage) Descriptor deprecated

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

Deprecated: Use ValidateKeyPackagesRequest_KeyPackage.ProtoReflect.Descriptor instead.

func (*ValidateKeyPackagesRequest_KeyPackage) GetKeyPackageBytesTlsSerialized

func (x *ValidateKeyPackagesRequest_KeyPackage) GetKeyPackageBytesTlsSerialized() []byte

func (*ValidateKeyPackagesRequest_KeyPackage) ProtoMessage

func (*ValidateKeyPackagesRequest_KeyPackage) ProtoMessage()

func (*ValidateKeyPackagesRequest_KeyPackage) ProtoReflect

func (*ValidateKeyPackagesRequest_KeyPackage) Reset

func (*ValidateKeyPackagesRequest_KeyPackage) String

type ValidateKeyPackagesResponse

type ValidateKeyPackagesResponse struct {
	Responses []*ValidateKeyPackagesResponse_ValidationResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
	// contains filtered or unexported fields
}

Response to ValidateKeyPackagesRequest

func (*ValidateKeyPackagesResponse) Descriptor deprecated

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

Deprecated: Use ValidateKeyPackagesResponse.ProtoReflect.Descriptor instead.

func (*ValidateKeyPackagesResponse) GetResponses

func (*ValidateKeyPackagesResponse) ProtoMessage

func (*ValidateKeyPackagesResponse) ProtoMessage()

func (*ValidateKeyPackagesResponse) ProtoReflect

func (*ValidateKeyPackagesResponse) Reset

func (x *ValidateKeyPackagesResponse) Reset()

func (*ValidateKeyPackagesResponse) String

func (x *ValidateKeyPackagesResponse) String() string

type ValidateKeyPackagesResponse_ValidationResponse

type ValidateKeyPackagesResponse_ValidationResponse struct {
	IsOk                    bool   `protobuf:"varint,1,opt,name=is_ok,json=isOk,proto3" json:"is_ok,omitempty"`
	ErrorMessage            string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	InstallationId          []byte `protobuf:"bytes,3,opt,name=installation_id,json=installationId,proto3" json:"installation_id,omitempty"`
	AccountAddress          string `protobuf:"bytes,4,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"`
	CredentialIdentityBytes []byte `` /* 132-byte string literal not displayed */
	Expiration              uint64 `protobuf:"varint,6,opt,name=expiration,proto3" json:"expiration,omitempty"`
	// contains filtered or unexported fields
}

An individual response to one key package

func (*ValidateKeyPackagesResponse_ValidationResponse) Descriptor deprecated

Deprecated: Use ValidateKeyPackagesResponse_ValidationResponse.ProtoReflect.Descriptor instead.

func (*ValidateKeyPackagesResponse_ValidationResponse) GetAccountAddress added in v3.36.1

func (*ValidateKeyPackagesResponse_ValidationResponse) GetCredentialIdentityBytes

func (x *ValidateKeyPackagesResponse_ValidationResponse) GetCredentialIdentityBytes() []byte

func (*ValidateKeyPackagesResponse_ValidationResponse) GetErrorMessage

func (*ValidateKeyPackagesResponse_ValidationResponse) GetExpiration added in v3.36.1

func (*ValidateKeyPackagesResponse_ValidationResponse) GetInstallationId

func (x *ValidateKeyPackagesResponse_ValidationResponse) GetInstallationId() []byte

func (*ValidateKeyPackagesResponse_ValidationResponse) GetIsOk

func (*ValidateKeyPackagesResponse_ValidationResponse) ProtoMessage

func (*ValidateKeyPackagesResponse_ValidationResponse) ProtoReflect

func (*ValidateKeyPackagesResponse_ValidationResponse) Reset

func (*ValidateKeyPackagesResponse_ValidationResponse) String

type ValidationApiClient

type ValidationApiClient interface {
	// Validates and parses a batch of key packages and returns relevant details
	ValidateKeyPackages(ctx context.Context, in *ValidateKeyPackagesRequest, opts ...grpc.CallOption) (*ValidateKeyPackagesResponse, error)
	// Validates and parses a group message and returns relevant details
	ValidateGroupMessages(ctx context.Context, in *ValidateGroupMessagesRequest, opts ...grpc.CallOption) (*ValidateGroupMessagesResponse, error)
}

ValidationApiClient is the client API for ValidationApi 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 ValidationApiServer

type ValidationApiServer interface {
	// Validates and parses a batch of key packages and returns relevant details
	ValidateKeyPackages(context.Context, *ValidateKeyPackagesRequest) (*ValidateKeyPackagesResponse, error)
	// Validates and parses a group message and returns relevant details
	ValidateGroupMessages(context.Context, *ValidateGroupMessagesRequest) (*ValidateGroupMessagesResponse, error)
	// contains filtered or unexported methods
}

ValidationApiServer is the server API for ValidationApi service. All implementations must embed UnimplementedValidationApiServer for forward compatibility

Jump to

Keyboard shortcuts

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