mev2

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package mev2 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_sift_me_v2_me_proto protoreflect.FileDescriptor
View Source
var MeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sift.me.v2.MeService",
	HandlerType: (*MeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetMe",
			Handler:    _MeService_GetMe_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "sift/me/v2/me.proto",
}

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

Functions

func RegisterMeServiceHandler

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

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

func RegisterMeServiceHandlerClient

func RegisterMeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MeServiceClient) error

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

func RegisterMeServiceHandlerFromEndpoint

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

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

func RegisterMeServiceHandlerServer

func RegisterMeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MeServiceServer) error

RegisterMeServiceHandlerServer registers the http handlers for service MeService to "mux". UnaryRPC :call MeServiceServer 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 RegisterMeServiceHandlerFromEndpoint instead.

func RegisterMeServiceServer

func RegisterMeServiceServer(s grpc.ServiceRegistrar, srv MeServiceServer)

Types

type GetMeRequest

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

func (*GetMeRequest) CloneMessageVT

func (m *GetMeRequest) CloneMessageVT() proto.Message

func (*GetMeRequest) CloneVT

func (m *GetMeRequest) CloneVT() *GetMeRequest

func (*GetMeRequest) Descriptor deprecated

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

Deprecated: Use GetMeRequest.ProtoReflect.Descriptor instead.

func (*GetMeRequest) EqualMessageVT

func (this *GetMeRequest) EqualMessageVT(thatMsg proto.Message) bool

func (*GetMeRequest) EqualVT

func (this *GetMeRequest) EqualVT(that *GetMeRequest) bool

func (*GetMeRequest) MarshalToSizedBufferVT

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

func (*GetMeRequest) MarshalToSizedBufferVTStrict

func (m *GetMeRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*GetMeRequest) MarshalToVT

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

func (*GetMeRequest) MarshalToVTStrict

func (m *GetMeRequest) MarshalToVTStrict(dAtA []byte) (int, error)

func (*GetMeRequest) MarshalVT

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

func (*GetMeRequest) MarshalVTStrict

func (m *GetMeRequest) MarshalVTStrict() (dAtA []byte, err error)

func (*GetMeRequest) ProtoMessage

func (*GetMeRequest) ProtoMessage()

func (*GetMeRequest) ProtoReflect

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

func (*GetMeRequest) Reset

func (x *GetMeRequest) Reset()

func (*GetMeRequest) SizeVT

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

func (*GetMeRequest) String

func (x *GetMeRequest) String() string

func (*GetMeRequest) UnmarshalVT

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

func (*GetMeRequest) UnmarshalVTUnsafe

func (m *GetMeRequest) UnmarshalVTUnsafe(dAtA []byte) error

type GetMeResponse

type GetMeResponse struct {
	UserId        string                 `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	UserEmail     string                 `protobuf:"bytes,2,opt,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"`
	Organizations []*v1.Organization     `protobuf:"bytes,3,rep,name=organizations,proto3" json:"organizations,omitempty"`
	IsAdmin       bool                   `protobuf:"varint,4,opt,name=is_admin,json=isAdmin,proto3" json:"is_admin,omitempty"`
	Permissions   *Permissions           `protobuf:"bytes,5,opt,name=permissions,proto3" json:"permissions,omitempty"`
	CreatedDate   *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_date,json=createdDate,proto3" json:"created_date,omitempty"`
	// Deprecated: Do not use.
	HashBasedMessageAuthenticationCode string `` /* 169-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetMeResponse) CloneMessageVT

func (m *GetMeResponse) CloneMessageVT() proto.Message

func (*GetMeResponse) CloneVT

func (m *GetMeResponse) CloneVT() *GetMeResponse

func (*GetMeResponse) Descriptor deprecated

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

Deprecated: Use GetMeResponse.ProtoReflect.Descriptor instead.

func (*GetMeResponse) EqualMessageVT

func (this *GetMeResponse) EqualMessageVT(thatMsg proto.Message) bool

func (*GetMeResponse) EqualVT

func (this *GetMeResponse) EqualVT(that *GetMeResponse) bool

func (*GetMeResponse) GetCreatedDate

func (x *GetMeResponse) GetCreatedDate() *timestamppb.Timestamp

func (*GetMeResponse) GetHashBasedMessageAuthenticationCode deprecated

func (x *GetMeResponse) GetHashBasedMessageAuthenticationCode() string

Deprecated: Do not use.

func (*GetMeResponse) GetIsAdmin

func (x *GetMeResponse) GetIsAdmin() bool

func (*GetMeResponse) GetOrganizations

func (x *GetMeResponse) GetOrganizations() []*v1.Organization

func (*GetMeResponse) GetPermissions

func (x *GetMeResponse) GetPermissions() *Permissions

func (*GetMeResponse) GetUserEmail

func (x *GetMeResponse) GetUserEmail() string

func (*GetMeResponse) GetUserId

func (x *GetMeResponse) GetUserId() string

func (*GetMeResponse) MarshalToSizedBufferVT

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

func (*GetMeResponse) MarshalToSizedBufferVTStrict

func (m *GetMeResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*GetMeResponse) MarshalToVT

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

func (*GetMeResponse) MarshalToVTStrict

func (m *GetMeResponse) MarshalToVTStrict(dAtA []byte) (int, error)

func (*GetMeResponse) MarshalVT

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

func (*GetMeResponse) MarshalVTStrict

func (m *GetMeResponse) MarshalVTStrict() (dAtA []byte, err error)

func (*GetMeResponse) ProtoMessage

func (*GetMeResponse) ProtoMessage()

func (*GetMeResponse) ProtoReflect

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

func (*GetMeResponse) Reset

func (x *GetMeResponse) Reset()

func (*GetMeResponse) SizeVT

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

func (*GetMeResponse) String

func (x *GetMeResponse) String() string

func (*GetMeResponse) UnmarshalVT

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

func (*GetMeResponse) UnmarshalVTUnsafe

func (m *GetMeResponse) UnmarshalVTUnsafe(dAtA []byte) error

type MeServiceClient

type MeServiceClient interface {
	GetMe(ctx context.Context, in *GetMeRequest, opts ...grpc.CallOption) (*GetMeResponse, error)
}

MeServiceClient is the client API for MeService 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 NewMeServiceClient

func NewMeServiceClient(cc grpc.ClientConnInterface) MeServiceClient

type MeServiceServer

type MeServiceServer interface {
	GetMe(context.Context, *GetMeRequest) (*GetMeResponse, error)
	// contains filtered or unexported methods
}

MeServiceServer is the server API for MeService service. All implementations must embed UnimplementedMeServiceServer for forward compatibility

type PermissionResources

type PermissionResources struct {
	PermissionResources map[string]*Resources `` /* 206-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*PermissionResources) CloneMessageVT

func (m *PermissionResources) CloneMessageVT() proto.Message

func (*PermissionResources) CloneVT

func (*PermissionResources) Descriptor deprecated

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

Deprecated: Use PermissionResources.ProtoReflect.Descriptor instead.

func (*PermissionResources) EqualMessageVT

func (this *PermissionResources) EqualMessageVT(thatMsg proto.Message) bool

func (*PermissionResources) EqualVT

func (this *PermissionResources) EqualVT(that *PermissionResources) bool

func (*PermissionResources) GetPermissionResources

func (x *PermissionResources) GetPermissionResources() map[string]*Resources

func (*PermissionResources) MarshalToSizedBufferVT

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

func (*PermissionResources) MarshalToSizedBufferVTStrict

func (m *PermissionResources) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*PermissionResources) MarshalToVT

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

func (*PermissionResources) MarshalToVTStrict

func (m *PermissionResources) MarshalToVTStrict(dAtA []byte) (int, error)

func (*PermissionResources) MarshalVT

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

func (*PermissionResources) MarshalVTStrict

func (m *PermissionResources) MarshalVTStrict() (dAtA []byte, err error)

func (*PermissionResources) ProtoMessage

func (*PermissionResources) ProtoMessage()

func (*PermissionResources) ProtoReflect

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

func (*PermissionResources) Reset

func (x *PermissionResources) Reset()

func (*PermissionResources) SizeVT

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

func (*PermissionResources) String

func (x *PermissionResources) String() string

func (*PermissionResources) UnmarshalVT

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

func (*PermissionResources) UnmarshalVTUnsafe

func (m *PermissionResources) UnmarshalVTUnsafe(dAtA []byte) error

type Permissions

type Permissions struct {
	OrganizationPermissionResources map[string]*PermissionResources `` /* 244-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Permissions) CloneMessageVT

func (m *Permissions) CloneMessageVT() proto.Message

func (*Permissions) CloneVT

func (m *Permissions) CloneVT() *Permissions

func (*Permissions) Descriptor deprecated

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

Deprecated: Use Permissions.ProtoReflect.Descriptor instead.

func (*Permissions) EqualMessageVT

func (this *Permissions) EqualMessageVT(thatMsg proto.Message) bool

func (*Permissions) EqualVT

func (this *Permissions) EqualVT(that *Permissions) bool

func (*Permissions) GetOrganizationPermissionResources

func (x *Permissions) GetOrganizationPermissionResources() map[string]*PermissionResources

func (*Permissions) MarshalToSizedBufferVT

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

func (*Permissions) MarshalToSizedBufferVTStrict

func (m *Permissions) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*Permissions) MarshalToVT

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

func (*Permissions) MarshalToVTStrict

func (m *Permissions) MarshalToVTStrict(dAtA []byte) (int, error)

func (*Permissions) MarshalVT

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

func (*Permissions) MarshalVTStrict

func (m *Permissions) MarshalVTStrict() (dAtA []byte, err error)

func (*Permissions) ProtoMessage

func (*Permissions) ProtoMessage()

func (*Permissions) ProtoReflect

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

func (*Permissions) Reset

func (x *Permissions) Reset()

func (*Permissions) SizeVT

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

func (*Permissions) String

func (x *Permissions) String() string

func (*Permissions) UnmarshalVT

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

func (*Permissions) UnmarshalVTUnsafe

func (m *Permissions) UnmarshalVTUnsafe(dAtA []byte) error

type Resources

type Resources struct {
	AssetIds  []string `protobuf:"bytes,1,rep,name=asset_ids,json=assetIds,proto3" json:"asset_ids,omitempty"`
	AllAssets bool     `protobuf:"varint,2,opt,name=all_assets,json=allAssets,proto3" json:"all_assets,omitempty"`
	// contains filtered or unexported fields
}

func (*Resources) CloneMessageVT

func (m *Resources) CloneMessageVT() proto.Message

func (*Resources) CloneVT

func (m *Resources) CloneVT() *Resources

func (*Resources) Descriptor deprecated

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

Deprecated: Use Resources.ProtoReflect.Descriptor instead.

func (*Resources) EqualMessageVT

func (this *Resources) EqualMessageVT(thatMsg proto.Message) bool

func (*Resources) EqualVT

func (this *Resources) EqualVT(that *Resources) bool

func (*Resources) GetAllAssets

func (x *Resources) GetAllAssets() bool

func (*Resources) GetAssetIds

func (x *Resources) GetAssetIds() []string

func (*Resources) MarshalToSizedBufferVT

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

func (*Resources) MarshalToSizedBufferVTStrict

func (m *Resources) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*Resources) MarshalToVT

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

func (*Resources) MarshalToVTStrict

func (m *Resources) MarshalToVTStrict(dAtA []byte) (int, error)

func (*Resources) MarshalVT

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

func (*Resources) MarshalVTStrict

func (m *Resources) MarshalVTStrict() (dAtA []byte, err error)

func (*Resources) ProtoMessage

func (*Resources) ProtoMessage()

func (*Resources) ProtoReflect

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

func (*Resources) Reset

func (x *Resources) Reset()

func (*Resources) SizeVT

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

func (*Resources) String

func (x *Resources) String() string

func (*Resources) UnmarshalVT

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

func (*Resources) UnmarshalVTUnsafe

func (m *Resources) UnmarshalVTUnsafe(dAtA []byte) error

type UnimplementedMeServiceServer

type UnimplementedMeServiceServer struct {
}

UnimplementedMeServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMeServiceServer) GetMe

type UnsafeMeServiceServer

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

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

Jump to

Keyboard shortcuts

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