strainer

package
v0.0.0-...-49c8f32 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-auth. DO NOT EDIT! source: include.proto

Code generated by protoc-gen-auth. DO NOT EDIT! source: inner_filter.proto

Package strainer is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var Channel_name = map[int32]string{
	0: "CHANNEL_UNSPECIFIED",
}
View Source
var Channel_value = map[string]int32{
	"CHANNEL_UNSPECIFIED": 0,
}
View Source
var Target_name = map[int32]string{
	0: "TARGET_UNSPECIFIED",
	1: "TARGET_NICKNAME",
	2: "TARGET_AVATAR",
	3: "TARGET_SIGNATURE",
	4: "TARGET_TEXT",
	5: "TARGET_IMAGE",
	6: "TARGET_VIDEO",
	7: "TARGET_AUDIO",
}
View Source
var Target_value = map[string]int32{
	"TARGET_UNSPECIFIED": 0,
	"TARGET_NICKNAME":    1,
	"TARGET_AVATAR":      2,
	"TARGET_SIGNATURE":   3,
	"TARGET_TEXT":        4,
	"TARGET_IMAGE":       5,
	"TARGET_VIDEO":       6,
	"TARGET_AUDIO":       7,
}

Functions

func RegisterInnerFilterHandler

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

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

func RegisterInnerFilterHandlerClient

func RegisterInnerFilterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InnerFilterClient) error

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

func RegisterInnerFilterHandlerFromEndpoint

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

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

func RegisterInnerFilterHandlerServer

func RegisterInnerFilterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InnerFilterServer) error

RegisterInnerFilterHandlerServer registers the http handlers for service InnerFilter to "mux". UnaryRPC :call InnerFilterServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterInnerFilterScopeServer

func RegisterInnerFilterScopeServer(component string, auth service.Authenticator, impl service.Implementor, srv InnerFilterServer) error

Register scoped server.

func RegisterInnerFilterServer

func RegisterInnerFilterServer(s *grpc.Server, srv InnerFilterServer)

Types

type Channel

type Channel int32

Strainer channel enums.

const (
	Channel_CHANNEL_UNSPECIFIED Channel = 0
)

func (Channel) Enum

func (x Channel) Enum() *Channel

func (Channel) EnumDescriptor

func (Channel) EnumDescriptor() ([]byte, []int)

func (Channel) String

func (x Channel) String() string

func (*Channel) UnmarshalJSON

func (x *Channel) UnmarshalJSON(data []byte) error

type FilterRequest

type FilterRequest struct {
	Channel              *Channel `protobuf:"varint,1,opt,name=channel,enum=appootb.strainer.Channel" json:"channel,omitempty"`
	Type                 *Target  `protobuf:"varint,2,req,name=type,enum=appootb.strainer.Target" json:"type,omitempty"`
	Data                 *string  `protobuf:"bytes,3,req,name=data" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Filter request.

func (*FilterRequest) Descriptor

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

func (*FilterRequest) GetChannel

func (m *FilterRequest) GetChannel() Channel

func (*FilterRequest) GetData

func (m *FilterRequest) GetData() string

func (*FilterRequest) GetType

func (m *FilterRequest) GetType() Target

func (*FilterRequest) ProtoMessage

func (*FilterRequest) ProtoMessage()

func (*FilterRequest) Reset

func (m *FilterRequest) Reset()

func (*FilterRequest) String

func (m *FilterRequest) String() string

func (*FilterRequest) Validate

func (m *FilterRequest) Validate() error

Validate checks the field values on FilterRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*FilterRequest) XXX_DiscardUnknown

func (m *FilterRequest) XXX_DiscardUnknown()

func (*FilterRequest) XXX_Marshal

func (m *FilterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FilterRequest) XXX_Merge

func (m *FilterRequest) XXX_Merge(src proto.Message)

func (*FilterRequest) XXX_Size

func (m *FilterRequest) XXX_Size() int

func (*FilterRequest) XXX_Unmarshal

func (m *FilterRequest) XXX_Unmarshal(b []byte) error

type FilterRequestValidationError

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

FilterRequestValidationError is the validation error returned by FilterRequest.Validate if the designated constraints aren't met.

func (FilterRequestValidationError) Cause

Cause function returns cause value.

func (FilterRequestValidationError) Error

Error satisfies the builtin error interface

func (FilterRequestValidationError) ErrorName

func (e FilterRequestValidationError) ErrorName() string

ErrorName returns error name.

func (FilterRequestValidationError) Field

Field function returns field value.

func (FilterRequestValidationError) Key

Key function returns key value.

func (FilterRequestValidationError) Reason

Reason function returns reason value.

type InnerFilterClient

type InnerFilterClient interface {
	// Filter.
	Filter(ctx context.Context, in *FilterRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

InnerFilterClient is the client API for InnerFilter service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewInnerFilterClient

func NewInnerFilterClient(cc *grpc.ClientConn) InnerFilterClient

type InnerFilterServer

type InnerFilterServer interface {
	// Filter.
	Filter(context.Context, *FilterRequest) (*empty.Empty, error)
}

InnerFilterServer is the server API for InnerFilter service.

type Target

type Target int32

Target type enums.

const (
	Target_TARGET_UNSPECIFIED Target = 0
	Target_TARGET_NICKNAME    Target = 1
	Target_TARGET_AVATAR      Target = 2
	Target_TARGET_SIGNATURE   Target = 3
	Target_TARGET_TEXT        Target = 4
	Target_TARGET_IMAGE       Target = 5
	Target_TARGET_VIDEO       Target = 6
	Target_TARGET_AUDIO       Target = 7
)

func (Target) Enum

func (x Target) Enum() *Target

func (Target) EnumDescriptor

func (Target) EnumDescriptor() ([]byte, []int)

func (Target) String

func (x Target) String() string

func (*Target) UnmarshalJSON

func (x *Target) UnmarshalJSON(data []byte) error

type UnimplementedInnerFilterServer

type UnimplementedInnerFilterServer struct {
}

UnimplementedInnerFilterServer can be embedded to have forward compatible implementations.

func (*UnimplementedInnerFilterServer) Filter

Jump to

Keyboard shortcuts

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