Documentation ¶
Overview ¶
Package route is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterRouteServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterRouteServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RouteServiceClient) error
- func RegisterRouteServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterRouteServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RouteServiceServer) error
- func RegisterRouteServiceServer(s grpc.ServiceRegistrar, srv RouteServiceServer)
- type Cors
- func (*Cors) Descriptor() ([]byte, []int)deprecated
- func (x *Cors) GetAllowCredentials() bool
- func (x *Cors) GetAllowHeaders() []string
- func (x *Cors) GetAllowMethods() []string
- func (x *Cors) GetAllowOrigins() []string
- func (x *Cors) GetEnabled() bool
- func (x *Cors) GetExposeHeaders() []string
- func (x *Cors) GetMaxAge() uint32
- func (*Cors) ProtoMessage()
- func (x *Cors) ProtoReflect() protoreflect.Message
- func (x *Cors) Reset()
- func (x *Cors) String() string
- func (m *Cors) Validate() error
- func (m *Cors) ValidateAll() error
- type CorsMultiError
- type CorsValidationError
- type DirectResponse
- func (*DirectResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DirectResponse) GetBody() string
- func (x *DirectResponse) GetCode() uint32
- func (*DirectResponse) ProtoMessage()
- func (x *DirectResponse) ProtoReflect() protoreflect.Message
- func (x *DirectResponse) Reset()
- func (x *DirectResponse) String() string
- func (m *DirectResponse) Validate() error
- func (m *DirectResponse) ValidateAll() error
- type DirectResponseMultiError
- type DirectResponseValidationError
- func (e DirectResponseValidationError) Cause() error
- func (e DirectResponseValidationError) Error() string
- func (e DirectResponseValidationError) ErrorName() string
- func (e DirectResponseValidationError) Field() string
- func (e DirectResponseValidationError) Key() bool
- func (e DirectResponseValidationError) Reason() string
- type Forward
- func (*Forward) Descriptor() ([]byte, []int)deprecated
- func (x *Forward) GetCors() *Cors
- func (x *Forward) GetLimiter() *Limiter
- func (x *Forward) GetRewrite() *Rewrite
- func (*Forward) ProtoMessage()
- func (x *Forward) ProtoReflect() protoreflect.Message
- func (x *Forward) Reset()
- func (x *Forward) String() string
- func (m *Forward) Validate() error
- func (m *Forward) ValidateAll() error
- type ForwardMultiError
- type ForwardValidationError
- type Limiter
- func (*Limiter) Descriptor() ([]byte, []int)deprecated
- func (x *Limiter) GetEnabled() bool
- func (x *Limiter) GetQps() uint32
- func (*Limiter) ProtoMessage()
- func (x *Limiter) ProtoReflect() protoreflect.Message
- func (x *Limiter) Reset()
- func (x *Limiter) String() string
- func (m *Limiter) Validate() error
- func (m *Limiter) ValidateAll() error
- type LimiterMultiError
- type LimiterValidationError
- type Limiter_Fallback
- func (*Limiter_Fallback) Descriptor() ([]byte, []int)deprecated
- func (x *Limiter_Fallback) GetBody() string
- func (x *Limiter_Fallback) GetRedirect() string
- func (x *Limiter_Fallback) GetStatus() uint32
- func (*Limiter_Fallback) ProtoMessage()
- func (x *Limiter_Fallback) ProtoReflect() protoreflect.Message
- func (x *Limiter_Fallback) Reset()
- func (x *Limiter_Fallback) String() string
- func (m *Limiter_Fallback) Validate() error
- func (m *Limiter_Fallback) ValidateAll() error
- type Limiter_FallbackMultiError
- type Limiter_FallbackValidationError
- func (e Limiter_FallbackValidationError) Cause() error
- func (e Limiter_FallbackValidationError) Error() string
- func (e Limiter_FallbackValidationError) ErrorName() string
- func (e Limiter_FallbackValidationError) Field() string
- func (e Limiter_FallbackValidationError) Key() bool
- func (e Limiter_FallbackValidationError) Reason() string
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetAppid() string
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- func (m *ListRequest) Validate() error
- func (m *ListRequest) ValidateAll() error
- type ListRequestMultiError
- type ListRequestValidationError
- func (e ListRequestValidationError) Cause() error
- func (e ListRequestValidationError) Error() string
- func (e ListRequestValidationError) ErrorName() string
- func (e ListRequestValidationError) Field() string
- func (e ListRequestValidationError) Key() bool
- func (e ListRequestValidationError) Reason() string
- type ListResponse
- func (*ListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResponse) GetItems() []*Route
- func (x *ListResponse) GetTotal() int64
- func (*ListResponse) ProtoMessage()
- func (x *ListResponse) ProtoReflect() protoreflect.Message
- func (x *ListResponse) Reset()
- func (x *ListResponse) String() string
- func (m *ListResponse) Validate() error
- func (m *ListResponse) ValidateAll() error
- type ListResponseMultiError
- type ListResponseValidationError
- func (e ListResponseValidationError) Cause() error
- func (e ListResponseValidationError) Error() string
- func (e ListResponseValidationError) ErrorName() string
- func (e ListResponseValidationError) Field() string
- func (e ListResponseValidationError) Key() bool
- func (e ListResponseValidationError) Reason() string
- type Redirect
- func (*Redirect) Descriptor() ([]byte, []int)deprecated
- func (x *Redirect) GetCode() uint32
- func (x *Redirect) GetUrl() string
- func (*Redirect) ProtoMessage()
- func (x *Redirect) ProtoReflect() protoreflect.Message
- func (x *Redirect) Reset()
- func (x *Redirect) String() string
- func (m *Redirect) Validate() error
- func (m *Redirect) ValidateAll() error
- type RedirectMultiError
- type RedirectValidationError
- type Rewrite
- func (*Rewrite) Descriptor() ([]byte, []int)deprecated
- func (x *Rewrite) GetAuthority() string
- func (x *Rewrite) GetEnabled() bool
- func (x *Rewrite) GetUri() string
- func (*Rewrite) ProtoMessage()
- func (x *Rewrite) ProtoReflect() protoreflect.Message
- func (x *Rewrite) Reset()
- func (x *Rewrite) String() string
- func (m *Rewrite) Validate() error
- func (m *Rewrite) ValidateAll() error
- type RewriteMultiError
- type RewriteValidationError
- type Route
- func (*Route) Descriptor() ([]byte, []int)deprecated
- func (x *Route) GetAppid() string
- func (x *Route) GetCreatedAt() *timestamppb.Timestamp
- func (x *Route) GetCreatedBy() *timestamppb.Timestamp
- func (x *Route) GetForward() *Forward
- func (x *Route) GetId() string
- func (x *Route) GetMethods() []string
- func (x *Route) GetMock() *DirectResponse
- func (x *Route) GetPath() string
- func (x *Route) GetRedirect() *Redirect
- func (x *Route) GetStatus() kiae.OpStatus
- func (x *Route) GetType() Route_Type
- func (x *Route) GetUpdatedAt() *timestamppb.Timestamp
- func (x *Route) GetUpdatedBy() *timestamppb.Timestamp
- func (*Route) ProtoMessage()
- func (x *Route) ProtoReflect() protoreflect.Message
- func (x *Route) Reset()
- func (x *Route) String() string
- func (m *Route) Validate() error
- func (m *Route) ValidateAll() error
- type RouteMultiError
- type RouteServiceClient
- type RouteServiceServer
- type RouteValidationError
- type Route_Type
- type UnimplementedRouteServiceServer
- func (UnimplementedRouteServiceServer) Create(context.Context, *Route) (*Route, error)
- func (UnimplementedRouteServiceServer) Delete(context.Context, *kiae.IdRequest) (*emptypb.Empty, error)
- func (UnimplementedRouteServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedRouteServiceServer) Update(context.Context, *UpdateRequest) (*Route, error)
- type UnsafeRouteServiceServer
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetPayload() *Route
- func (x *UpdateRequest) GetUpdateMask() *fieldmaskpb.FieldMask
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- func (m *UpdateRequest) Validate() error
- func (m *UpdateRequest) ValidateAll() error
- type UpdateRequestMultiError
- type UpdateRequestValidationError
- func (e UpdateRequestValidationError) Cause() error
- func (e UpdateRequestValidationError) Error() string
- func (e UpdateRequestValidationError) ErrorName() string
- func (e UpdateRequestValidationError) Field() string
- func (e UpdateRequestValidationError) Key() bool
- func (e UpdateRequestValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var ( Route_Type_name = map[int32]string{ 0: "FORWARD", 1: "REDIRECT", 2: "DIRECT_RESPONSE", } Route_Type_value = map[string]int32{ "FORWARD": 0, "REDIRECT": 1, "DIRECT_RESPONSE": 2, } )
Enum value maps for Route_Type.
var File_route_route_proto protoreflect.FileDescriptor
var RouteService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "route.RouteService", HandlerType: (*RouteServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _RouteService_List_Handler, }, { MethodName: "Create", Handler: _RouteService_Create_Handler, }, { MethodName: "Update", Handler: _RouteService_Update_Handler, }, { MethodName: "Delete", Handler: _RouteService_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "route/route.proto", }
RouteService_ServiceDesc is the grpc.ServiceDesc for RouteService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRouteServiceHandler ¶
func RegisterRouteServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterRouteServiceHandler registers the http handlers for service RouteService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterRouteServiceHandlerClient ¶
func RegisterRouteServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RouteServiceClient) error
RegisterRouteServiceHandlerClient registers the http handlers for service RouteService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RouteServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RouteServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "RouteServiceClient" to call the correct interceptors.
func RegisterRouteServiceHandlerFromEndpoint ¶
func RegisterRouteServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterRouteServiceHandlerFromEndpoint is same as RegisterRouteServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterRouteServiceHandlerServer ¶
func RegisterRouteServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RouteServiceServer) error
RegisterRouteServiceHandlerServer registers the http handlers for service RouteService to "mux". UnaryRPC :call RouteServiceServer 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 RegisterRouteServiceHandlerFromEndpoint instead.
func RegisterRouteServiceServer ¶
func RegisterRouteServiceServer(s grpc.ServiceRegistrar, srv RouteServiceServer)
Types ¶
type Cors ¶
type Cors struct { Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` AllowOrigins []string `protobuf:"bytes,2,rep,name=allow_origins,json=allowOrigins,proto3" json:"allowOrigins,omitempty"` // @gotags: json:"allowOrigins,omitempty" AllowMethods []string `protobuf:"bytes,3,rep,name=allow_methods,json=allowMethods,proto3" json:"allowMethods,omitempty"` // @gotags: json:"allowMethods,omitempty" AllowHeaders []string `protobuf:"bytes,4,rep,name=allow_headers,json=allowHeaders,proto3" json:"allowHeaders,omitempty"` // @gotags: json:"allowHeaders,omitempty" ExposeHeaders []string `protobuf:"bytes,5,rep,name=expose_headers,json=exposeHeaders,proto3" json:"exposeHeaders,omitempty"` // @gotags: json:"exposeHeaders,omitempty" AllowCredentials bool `protobuf:"varint,6,opt,name=allow_credentials,json=allowCredentials,proto3" json:"allowCredentials,omitempty"` // @gotags: json:"allowCredentials,omitempty" MaxAge uint32 `protobuf:"varint,7,opt,name=max_age,json=maxAge,proto3" json:"maxAge,omitempty"` // @gotags: json:"maxAge,omitempty" // contains filtered or unexported fields }
func (*Cors) Descriptor
deprecated
func (*Cors) GetAllowCredentials ¶
func (*Cors) GetAllowHeaders ¶
func (*Cors) GetAllowMethods ¶
func (*Cors) GetAllowOrigins ¶
func (*Cors) GetEnabled ¶
func (*Cors) GetExposeHeaders ¶
func (*Cors) ProtoMessage ¶
func (*Cors) ProtoMessage()
func (*Cors) ProtoReflect ¶
func (x *Cors) ProtoReflect() protoreflect.Message
func (*Cors) Validate ¶
Validate checks the field values on Cors with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Cors) ValidateAll ¶
ValidateAll checks the field values on Cors with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CorsMultiError, or nil if none found.
type CorsMultiError ¶
type CorsMultiError []error
CorsMultiError is an error wrapping multiple validation errors returned by Cors.ValidateAll() if the designated constraints aren't met.
func (CorsMultiError) AllErrors ¶
func (m CorsMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CorsMultiError) Error ¶
func (m CorsMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CorsValidationError ¶
type CorsValidationError struct {
// contains filtered or unexported fields
}
CorsValidationError is the validation error returned by Cors.Validate if the designated constraints aren't met.
func (CorsValidationError) Cause ¶
func (e CorsValidationError) Cause() error
Cause function returns cause value.
func (CorsValidationError) Error ¶
func (e CorsValidationError) Error() string
Error satisfies the builtin error interface
func (CorsValidationError) ErrorName ¶
func (e CorsValidationError) ErrorName() string
ErrorName returns error name.
func (CorsValidationError) Field ¶
func (e CorsValidationError) Field() string
Field function returns field value.
func (CorsValidationError) Key ¶
func (e CorsValidationError) Key() bool
Key function returns key value.
func (CorsValidationError) Reason ¶
func (e CorsValidationError) Reason() string
Reason function returns reason value.
type DirectResponse ¶
type DirectResponse struct { Code uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*DirectResponse) Descriptor
deprecated
func (*DirectResponse) Descriptor() ([]byte, []int)
Deprecated: Use DirectResponse.ProtoReflect.Descriptor instead.
func (*DirectResponse) GetBody ¶
func (x *DirectResponse) GetBody() string
func (*DirectResponse) GetCode ¶
func (x *DirectResponse) GetCode() uint32
func (*DirectResponse) ProtoMessage ¶
func (*DirectResponse) ProtoMessage()
func (*DirectResponse) ProtoReflect ¶
func (x *DirectResponse) ProtoReflect() protoreflect.Message
func (*DirectResponse) Reset ¶
func (x *DirectResponse) Reset()
func (*DirectResponse) String ¶
func (x *DirectResponse) String() string
func (*DirectResponse) Validate ¶
func (m *DirectResponse) Validate() error
Validate checks the field values on DirectResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*DirectResponse) ValidateAll ¶
func (m *DirectResponse) ValidateAll() error
ValidateAll checks the field values on DirectResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DirectResponseMultiError, or nil if none found.
type DirectResponseMultiError ¶
type DirectResponseMultiError []error
DirectResponseMultiError is an error wrapping multiple validation errors returned by DirectResponse.ValidateAll() if the designated constraints aren't met.
func (DirectResponseMultiError) AllErrors ¶
func (m DirectResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DirectResponseMultiError) Error ¶
func (m DirectResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DirectResponseValidationError ¶
type DirectResponseValidationError struct {
// contains filtered or unexported fields
}
DirectResponseValidationError is the validation error returned by DirectResponse.Validate if the designated constraints aren't met.
func (DirectResponseValidationError) Cause ¶
func (e DirectResponseValidationError) Cause() error
Cause function returns cause value.
func (DirectResponseValidationError) Error ¶
func (e DirectResponseValidationError) Error() string
Error satisfies the builtin error interface
func (DirectResponseValidationError) ErrorName ¶
func (e DirectResponseValidationError) ErrorName() string
ErrorName returns error name.
func (DirectResponseValidationError) Field ¶
func (e DirectResponseValidationError) Field() string
Field function returns field value.
func (DirectResponseValidationError) Key ¶
func (e DirectResponseValidationError) Key() bool
Key function returns key value.
func (DirectResponseValidationError) Reason ¶
func (e DirectResponseValidationError) Reason() string
Reason function returns reason value.
type Forward ¶
type Forward struct { Cors *Cors `protobuf:"bytes,1,opt,name=cors,proto3" json:"cors,omitempty"` Rewrite *Rewrite `protobuf:"bytes,2,opt,name=rewrite,proto3" json:"rewrite,omitempty"` Limiter *Limiter `protobuf:"bytes,9,opt,name=limiter,proto3" json:"limiter,omitempty"` // contains filtered or unexported fields }
func (*Forward) Descriptor
deprecated
func (*Forward) GetLimiter ¶
func (*Forward) GetRewrite ¶
func (*Forward) ProtoMessage ¶
func (*Forward) ProtoMessage()
func (*Forward) ProtoReflect ¶
func (x *Forward) ProtoReflect() protoreflect.Message
func (*Forward) Validate ¶
Validate checks the field values on Forward with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Forward) ValidateAll ¶
ValidateAll checks the field values on Forward with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ForwardMultiError, or nil if none found.
type ForwardMultiError ¶
type ForwardMultiError []error
ForwardMultiError is an error wrapping multiple validation errors returned by Forward.ValidateAll() if the designated constraints aren't met.
func (ForwardMultiError) AllErrors ¶
func (m ForwardMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ForwardMultiError) Error ¶
func (m ForwardMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ForwardValidationError ¶
type ForwardValidationError struct {
// contains filtered or unexported fields
}
ForwardValidationError is the validation error returned by Forward.Validate if the designated constraints aren't met.
func (ForwardValidationError) Cause ¶
func (e ForwardValidationError) Cause() error
Cause function returns cause value.
func (ForwardValidationError) Error ¶
func (e ForwardValidationError) Error() string
Error satisfies the builtin error interface
func (ForwardValidationError) ErrorName ¶
func (e ForwardValidationError) ErrorName() string
ErrorName returns error name.
func (ForwardValidationError) Field ¶
func (e ForwardValidationError) Field() string
Field function returns field value.
func (ForwardValidationError) Key ¶
func (e ForwardValidationError) Key() bool
Key function returns key value.
func (ForwardValidationError) Reason ¶
func (e ForwardValidationError) Reason() string
Reason function returns reason value.
type Limiter ¶
type Limiter struct { Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` Qps uint32 `protobuf:"varint,2,opt,name=qps,proto3" json:"qps,omitempty"` // contains filtered or unexported fields }
func (*Limiter) Descriptor
deprecated
func (*Limiter) GetEnabled ¶
func (*Limiter) ProtoMessage ¶
func (*Limiter) ProtoMessage()
func (*Limiter) ProtoReflect ¶
func (x *Limiter) ProtoReflect() protoreflect.Message
func (*Limiter) Validate ¶
Validate checks the field values on Limiter with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Limiter) ValidateAll ¶
ValidateAll checks the field values on Limiter with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LimiterMultiError, or nil if none found.
type LimiterMultiError ¶
type LimiterMultiError []error
LimiterMultiError is an error wrapping multiple validation errors returned by Limiter.ValidateAll() if the designated constraints aren't met.
func (LimiterMultiError) AllErrors ¶
func (m LimiterMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LimiterMultiError) Error ¶
func (m LimiterMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LimiterValidationError ¶
type LimiterValidationError struct {
// contains filtered or unexported fields
}
LimiterValidationError is the validation error returned by Limiter.Validate if the designated constraints aren't met.
func (LimiterValidationError) Cause ¶
func (e LimiterValidationError) Cause() error
Cause function returns cause value.
func (LimiterValidationError) Error ¶
func (e LimiterValidationError) Error() string
Error satisfies the builtin error interface
func (LimiterValidationError) ErrorName ¶
func (e LimiterValidationError) ErrorName() string
ErrorName returns error name.
func (LimiterValidationError) Field ¶
func (e LimiterValidationError) Field() string
Field function returns field value.
func (LimiterValidationError) Key ¶
func (e LimiterValidationError) Key() bool
Key function returns key value.
func (LimiterValidationError) Reason ¶
func (e LimiterValidationError) Reason() string
Reason function returns reason value.
type Limiter_Fallback ¶
type Limiter_Fallback struct { Status uint32 `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"` Body string `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` Redirect string `protobuf:"bytes,4,opt,name=redirect,proto3" json:"redirect,omitempty"` // contains filtered or unexported fields }
func (*Limiter_Fallback) Descriptor
deprecated
func (*Limiter_Fallback) Descriptor() ([]byte, []int)
Deprecated: Use Limiter_Fallback.ProtoReflect.Descriptor instead.
func (*Limiter_Fallback) GetBody ¶
func (x *Limiter_Fallback) GetBody() string
func (*Limiter_Fallback) GetRedirect ¶
func (x *Limiter_Fallback) GetRedirect() string
func (*Limiter_Fallback) GetStatus ¶
func (x *Limiter_Fallback) GetStatus() uint32
func (*Limiter_Fallback) ProtoMessage ¶
func (*Limiter_Fallback) ProtoMessage()
func (*Limiter_Fallback) ProtoReflect ¶
func (x *Limiter_Fallback) ProtoReflect() protoreflect.Message
func (*Limiter_Fallback) Reset ¶
func (x *Limiter_Fallback) Reset()
func (*Limiter_Fallback) String ¶
func (x *Limiter_Fallback) String() string
func (*Limiter_Fallback) Validate ¶
func (m *Limiter_Fallback) Validate() error
Validate checks the field values on Limiter_Fallback with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Limiter_Fallback) ValidateAll ¶
func (m *Limiter_Fallback) ValidateAll() error
ValidateAll checks the field values on Limiter_Fallback with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in Limiter_FallbackMultiError, or nil if none found.
type Limiter_FallbackMultiError ¶
type Limiter_FallbackMultiError []error
Limiter_FallbackMultiError is an error wrapping multiple validation errors returned by Limiter_Fallback.ValidateAll() if the designated constraints aren't met.
func (Limiter_FallbackMultiError) AllErrors ¶
func (m Limiter_FallbackMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (Limiter_FallbackMultiError) Error ¶
func (m Limiter_FallbackMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type Limiter_FallbackValidationError ¶
type Limiter_FallbackValidationError struct {
// contains filtered or unexported fields
}
Limiter_FallbackValidationError is the validation error returned by Limiter_Fallback.Validate if the designated constraints aren't met.
func (Limiter_FallbackValidationError) Cause ¶
func (e Limiter_FallbackValidationError) Cause() error
Cause function returns cause value.
func (Limiter_FallbackValidationError) Error ¶
func (e Limiter_FallbackValidationError) Error() string
Error satisfies the builtin error interface
func (Limiter_FallbackValidationError) ErrorName ¶
func (e Limiter_FallbackValidationError) ErrorName() string
ErrorName returns error name.
func (Limiter_FallbackValidationError) Field ¶
func (e Limiter_FallbackValidationError) Field() string
Field function returns field value.
func (Limiter_FallbackValidationError) Key ¶
func (e Limiter_FallbackValidationError) Key() bool
Key function returns key value.
func (Limiter_FallbackValidationError) Reason ¶
func (e Limiter_FallbackValidationError) Reason() string
Reason function returns reason value.
type ListRequest ¶
type ListRequest struct { Appid string `protobuf:"bytes,1,opt,name=appid,proto3" json:"appid,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetAppid ¶
func (x *ListRequest) GetAppid() string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
func (*ListRequest) Validate ¶
func (m *ListRequest) Validate() error
Validate checks the field values on ListRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ListRequest) ValidateAll ¶
func (m *ListRequest) ValidateAll() error
ValidateAll checks the field values on ListRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListRequestMultiError, or nil if none found.
type ListRequestMultiError ¶
type ListRequestMultiError []error
ListRequestMultiError is an error wrapping multiple validation errors returned by ListRequest.ValidateAll() if the designated constraints aren't met.
func (ListRequestMultiError) AllErrors ¶
func (m ListRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListRequestMultiError) Error ¶
func (m ListRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListRequestValidationError ¶
type ListRequestValidationError struct {
// contains filtered or unexported fields
}
ListRequestValidationError is the validation error returned by ListRequest.Validate if the designated constraints aren't met.
func (ListRequestValidationError) Cause ¶
func (e ListRequestValidationError) Cause() error
Cause function returns cause value.
func (ListRequestValidationError) Error ¶
func (e ListRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListRequestValidationError) ErrorName ¶
func (e ListRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListRequestValidationError) Field ¶
func (e ListRequestValidationError) Field() string
Field function returns field value.
func (ListRequestValidationError) Key ¶
func (e ListRequestValidationError) Key() bool
Key function returns key value.
func (ListRequestValidationError) Reason ¶
func (e ListRequestValidationError) Reason() string
Reason function returns reason value.
type ListResponse ¶
type ListResponse struct { Items []*Route `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetItems ¶
func (x *ListResponse) GetItems() []*Route
func (*ListResponse) GetTotal ¶
func (x *ListResponse) GetTotal() int64
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
func (*ListResponse) Validate ¶
func (m *ListResponse) Validate() error
Validate checks the field values on ListResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ListResponse) ValidateAll ¶
func (m *ListResponse) ValidateAll() error
ValidateAll checks the field values on ListResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListResponseMultiError, or nil if none found.
type ListResponseMultiError ¶
type ListResponseMultiError []error
ListResponseMultiError is an error wrapping multiple validation errors returned by ListResponse.ValidateAll() if the designated constraints aren't met.
func (ListResponseMultiError) AllErrors ¶
func (m ListResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListResponseMultiError) Error ¶
func (m ListResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListResponseValidationError ¶
type ListResponseValidationError struct {
// contains filtered or unexported fields
}
ListResponseValidationError is the validation error returned by ListResponse.Validate if the designated constraints aren't met.
func (ListResponseValidationError) Cause ¶
func (e ListResponseValidationError) Cause() error
Cause function returns cause value.
func (ListResponseValidationError) Error ¶
func (e ListResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListResponseValidationError) ErrorName ¶
func (e ListResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListResponseValidationError) Field ¶
func (e ListResponseValidationError) Field() string
Field function returns field value.
func (ListResponseValidationError) Key ¶
func (e ListResponseValidationError) Key() bool
Key function returns key value.
func (ListResponseValidationError) Reason ¶
func (e ListResponseValidationError) Reason() string
Reason function returns reason value.
type Redirect ¶
type Redirect struct { Code uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*Redirect) Descriptor
deprecated
func (*Redirect) ProtoMessage ¶
func (*Redirect) ProtoMessage()
func (*Redirect) ProtoReflect ¶
func (x *Redirect) ProtoReflect() protoreflect.Message
func (*Redirect) Validate ¶
Validate checks the field values on Redirect with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Redirect) ValidateAll ¶
ValidateAll checks the field values on Redirect with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RedirectMultiError, or nil if none found.
type RedirectMultiError ¶
type RedirectMultiError []error
RedirectMultiError is an error wrapping multiple validation errors returned by Redirect.ValidateAll() if the designated constraints aren't met.
func (RedirectMultiError) AllErrors ¶
func (m RedirectMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RedirectMultiError) Error ¶
func (m RedirectMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RedirectValidationError ¶
type RedirectValidationError struct {
// contains filtered or unexported fields
}
RedirectValidationError is the validation error returned by Redirect.Validate if the designated constraints aren't met.
func (RedirectValidationError) Cause ¶
func (e RedirectValidationError) Cause() error
Cause function returns cause value.
func (RedirectValidationError) Error ¶
func (e RedirectValidationError) Error() string
Error satisfies the builtin error interface
func (RedirectValidationError) ErrorName ¶
func (e RedirectValidationError) ErrorName() string
ErrorName returns error name.
func (RedirectValidationError) Field ¶
func (e RedirectValidationError) Field() string
Field function returns field value.
func (RedirectValidationError) Key ¶
func (e RedirectValidationError) Key() bool
Key function returns key value.
func (RedirectValidationError) Reason ¶
func (e RedirectValidationError) Reason() string
Reason function returns reason value.
type Rewrite ¶
type Rewrite struct { Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` // contains filtered or unexported fields }
func (*Rewrite) Descriptor
deprecated
func (*Rewrite) GetAuthority ¶
func (*Rewrite) GetEnabled ¶
func (*Rewrite) ProtoMessage ¶
func (*Rewrite) ProtoMessage()
func (*Rewrite) ProtoReflect ¶
func (x *Rewrite) ProtoReflect() protoreflect.Message
func (*Rewrite) Validate ¶
Validate checks the field values on Rewrite with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Rewrite) ValidateAll ¶
ValidateAll checks the field values on Rewrite with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RewriteMultiError, or nil if none found.
type RewriteMultiError ¶
type RewriteMultiError []error
RewriteMultiError is an error wrapping multiple validation errors returned by Rewrite.ValidateAll() if the designated constraints aren't met.
func (RewriteMultiError) AllErrors ¶
func (m RewriteMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RewriteMultiError) Error ¶
func (m RewriteMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RewriteValidationError ¶
type RewriteValidationError struct {
// contains filtered or unexported fields
}
RewriteValidationError is the validation error returned by Rewrite.Validate if the designated constraints aren't met.
func (RewriteValidationError) Cause ¶
func (e RewriteValidationError) Cause() error
Cause function returns cause value.
func (RewriteValidationError) Error ¶
func (e RewriteValidationError) Error() string
Error satisfies the builtin error interface
func (RewriteValidationError) ErrorName ¶
func (e RewriteValidationError) ErrorName() string
ErrorName returns error name.
func (RewriteValidationError) Field ¶
func (e RewriteValidationError) Field() string
Field function returns field value.
func (RewriteValidationError) Key ¶
func (e RewriteValidationError) Key() bool
Key function returns key value.
func (RewriteValidationError) Reason ¶
func (e RewriteValidationError) Reason() string
Reason function returns reason value.
type Route ¶
type Route struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id,omitempty"` // @gotags: bson:"_id,omitempty" Appid string `protobuf:"bytes,2,opt,name=appid,proto3" json:"appid,omitempty"` Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` Methods []string `protobuf:"bytes,6,rep,name=methods,proto3" json:"methods,omitempty"` Type Route_Type `protobuf:"varint,7,opt,name=type,proto3,enum=route.Route_Type" json:"type,omitempty"` Forward *Forward `protobuf:"bytes,10,opt,name=forward,proto3" json:"forward,omitempty"` Redirect *Redirect `protobuf:"bytes,11,opt,name=redirect,proto3" json:"redirect,omitempty"` Mock *DirectResponse `protobuf:"bytes,12,opt,name=mock,proto3" json:"mock,omitempty"` Status kiae.OpStatus `protobuf:"varint,20,opt,name=status,proto3,enum=kiae.OpStatus" json:"status,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,101,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` CreatedBy *timestamppb.Timestamp `protobuf:"bytes,102,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,103,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` UpdatedBy *timestamppb.Timestamp `protobuf:"bytes,104,opt,name=updated_by,json=updatedBy,proto3" json:"updated_by,omitempty"` // contains filtered or unexported fields }
func (*Route) Descriptor
deprecated
func (*Route) GetCreatedAt ¶
func (x *Route) GetCreatedAt() *timestamppb.Timestamp
func (*Route) GetCreatedBy ¶
func (x *Route) GetCreatedBy() *timestamppb.Timestamp
func (*Route) GetForward ¶
func (*Route) GetMethods ¶
func (*Route) GetMock ¶
func (x *Route) GetMock() *DirectResponse
func (*Route) GetRedirect ¶
func (*Route) GetType ¶
func (x *Route) GetType() Route_Type
func (*Route) GetUpdatedAt ¶
func (x *Route) GetUpdatedAt() *timestamppb.Timestamp
func (*Route) GetUpdatedBy ¶
func (x *Route) GetUpdatedBy() *timestamppb.Timestamp
func (*Route) ProtoMessage ¶
func (*Route) ProtoMessage()
func (*Route) ProtoReflect ¶
func (x *Route) ProtoReflect() protoreflect.Message
func (*Route) Validate ¶
Validate checks the field values on Route with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Route) ValidateAll ¶
ValidateAll checks the field values on Route with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RouteMultiError, or nil if none found.
type RouteMultiError ¶
type RouteMultiError []error
RouteMultiError is an error wrapping multiple validation errors returned by Route.ValidateAll() if the designated constraints aren't met.
func (RouteMultiError) AllErrors ¶
func (m RouteMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RouteMultiError) Error ¶
func (m RouteMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RouteServiceClient ¶
type RouteServiceClient interface { List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) Create(ctx context.Context, in *Route, opts ...grpc.CallOption) (*Route, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*Route, error) Delete(ctx context.Context, in *kiae.IdRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
RouteServiceClient is the client API for RouteService 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 NewRouteServiceClient ¶
func NewRouteServiceClient(cc grpc.ClientConnInterface) RouteServiceClient
type RouteServiceServer ¶
type RouteServiceServer interface { List(context.Context, *ListRequest) (*ListResponse, error) Create(context.Context, *Route) (*Route, error) Update(context.Context, *UpdateRequest) (*Route, error) Delete(context.Context, *kiae.IdRequest) (*emptypb.Empty, error) }
RouteServiceServer is the server API for RouteService service. All implementations should embed UnimplementedRouteServiceServer for forward compatibility
type RouteValidationError ¶
type RouteValidationError struct {
// contains filtered or unexported fields
}
RouteValidationError is the validation error returned by Route.Validate if the designated constraints aren't met.
func (RouteValidationError) Cause ¶
func (e RouteValidationError) Cause() error
Cause function returns cause value.
func (RouteValidationError) Error ¶
func (e RouteValidationError) Error() string
Error satisfies the builtin error interface
func (RouteValidationError) ErrorName ¶
func (e RouteValidationError) ErrorName() string
ErrorName returns error name.
func (RouteValidationError) Field ¶
func (e RouteValidationError) Field() string
Field function returns field value.
func (RouteValidationError) Key ¶
func (e RouteValidationError) Key() bool
Key function returns key value.
func (RouteValidationError) Reason ¶
func (e RouteValidationError) Reason() string
Reason function returns reason value.
type Route_Type ¶
type Route_Type int32
const ( Route_FORWARD Route_Type = 0 Route_REDIRECT Route_Type = 1 Route_DIRECT_RESPONSE Route_Type = 2 )
func (Route_Type) Descriptor ¶
func (Route_Type) Descriptor() protoreflect.EnumDescriptor
func (Route_Type) Enum ¶
func (x Route_Type) Enum() *Route_Type
func (Route_Type) EnumDescriptor
deprecated
func (Route_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Route_Type.Descriptor instead.
func (Route_Type) Number ¶
func (x Route_Type) Number() protoreflect.EnumNumber
func (Route_Type) String ¶
func (x Route_Type) String() string
func (Route_Type) Type ¶
func (Route_Type) Type() protoreflect.EnumType
type UnimplementedRouteServiceServer ¶
type UnimplementedRouteServiceServer struct { }
UnimplementedRouteServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedRouteServiceServer) List ¶
func (UnimplementedRouteServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedRouteServiceServer) Update ¶
func (UnimplementedRouteServiceServer) Update(context.Context, *UpdateRequest) (*Route, error)
type UnsafeRouteServiceServer ¶
type UnsafeRouteServiceServer interface {
// contains filtered or unexported methods
}
UnsafeRouteServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RouteServiceServer will result in compilation errors.
type UpdateRequest ¶
type UpdateRequest struct { Payload *Route `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` // contains filtered or unexported fields }
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetPayload ¶
func (x *UpdateRequest) GetPayload() *Route
func (*UpdateRequest) GetUpdateMask ¶
func (x *UpdateRequest) GetUpdateMask() *fieldmaskpb.FieldMask
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
func (*UpdateRequest) Validate ¶
func (m *UpdateRequest) Validate() error
Validate checks the field values on UpdateRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UpdateRequest) ValidateAll ¶
func (m *UpdateRequest) ValidateAll() error
ValidateAll checks the field values on UpdateRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateRequestMultiError, or nil if none found.
type UpdateRequestMultiError ¶
type UpdateRequestMultiError []error
UpdateRequestMultiError is an error wrapping multiple validation errors returned by UpdateRequest.ValidateAll() if the designated constraints aren't met.
func (UpdateRequestMultiError) AllErrors ¶
func (m UpdateRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateRequestMultiError) Error ¶
func (m UpdateRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateRequestValidationError ¶
type UpdateRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateRequestValidationError is the validation error returned by UpdateRequest.Validate if the designated constraints aren't met.
func (UpdateRequestValidationError) Cause ¶
func (e UpdateRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateRequestValidationError) Error ¶
func (e UpdateRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateRequestValidationError) ErrorName ¶
func (e UpdateRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateRequestValidationError) Field ¶
func (e UpdateRequestValidationError) Field() string
Field function returns field value.
func (UpdateRequestValidationError) Key ¶
func (e UpdateRequestValidationError) Key() bool
Key function returns key value.
func (UpdateRequestValidationError) Reason ¶
func (e UpdateRequestValidationError) Reason() string
Reason function returns reason value.