coprocess

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package coprocess is a generated protocol buffer package.

It is generated from these files:

coprocess_common.proto
coprocess_mini_request_object.proto
coprocess_object.proto
coprocess_return_overrides.proto
coprocess_session_state.proto

It has these top-level messages:

StringSlice
MiniRequestObject
Object
Event
EventReply
ReturnOverrides
AccessSpec
AccessDefinition
BasicAuthData
JWTData
Monitor
SessionState

Index

Constants

This section is empty.

Variables

View Source
var HookType_name = map[int32]string{
	0: "Unknown",
	1: "Pre",
	2: "Post",
	3: "PostKeyAuth",
	4: "CustomKeyCheck",
}
View Source
var HookType_value = map[string]int32{
	"Unknown":        0,
	"Pre":            1,
	"Post":           2,
	"PostKeyAuth":    3,
	"CustomKeyCheck": 4,
}

Functions

func RegisterDispatcherServer

func RegisterDispatcherServer(s *grpc.Server, srv DispatcherServer)

Types

type AccessDefinition

type AccessDefinition struct {
	ApiName     string        `protobuf:"bytes,1,opt,name=api_name,json=apiName" json:"api_name,omitempty"`
	ApiId       string        `protobuf:"bytes,2,opt,name=api_id,json=apiId" json:"api_id,omitempty"`
	Versions    []string      `protobuf:"bytes,3,rep,name=versions" json:"versions,omitempty"`
	AllowedUrls []*AccessSpec `protobuf:"bytes,4,rep,name=allowed_urls,json=allowedUrls" json:"allowed_urls,omitempty"`
}

func (*AccessDefinition) Descriptor

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

func (*AccessDefinition) GetAllowedUrls

func (m *AccessDefinition) GetAllowedUrls() []*AccessSpec

func (*AccessDefinition) GetApiId

func (m *AccessDefinition) GetApiId() string

func (*AccessDefinition) GetApiName

func (m *AccessDefinition) GetApiName() string

func (*AccessDefinition) GetVersions

func (m *AccessDefinition) GetVersions() []string

func (*AccessDefinition) ProtoMessage

func (*AccessDefinition) ProtoMessage()

func (*AccessDefinition) Reset

func (m *AccessDefinition) Reset()

func (*AccessDefinition) String

func (m *AccessDefinition) String() string

type AccessSpec

type AccessSpec struct {
	Url     string   `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
	Methods []string `protobuf:"bytes,2,rep,name=methods" json:"methods,omitempty"`
}

func (*AccessSpec) Descriptor

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

func (*AccessSpec) GetMethods

func (m *AccessSpec) GetMethods() []string

func (*AccessSpec) GetUrl

func (m *AccessSpec) GetUrl() string

func (*AccessSpec) ProtoMessage

func (*AccessSpec) ProtoMessage()

func (*AccessSpec) Reset

func (m *AccessSpec) Reset()

func (*AccessSpec) String

func (m *AccessSpec) String() string

type BasicAuthData

type BasicAuthData struct {
	Password string `protobuf:"bytes,1,opt,name=password" json:"password,omitempty"`
	Hash     string `protobuf:"bytes,2,opt,name=hash" json:"hash,omitempty"`
}

func (*BasicAuthData) Descriptor

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

func (*BasicAuthData) GetHash

func (m *BasicAuthData) GetHash() string

func (*BasicAuthData) GetPassword

func (m *BasicAuthData) GetPassword() string

func (*BasicAuthData) ProtoMessage

func (*BasicAuthData) ProtoMessage()

func (*BasicAuthData) Reset

func (m *BasicAuthData) Reset()

func (*BasicAuthData) String

func (m *BasicAuthData) String() string

type DispatcherClient

type DispatcherClient interface {
	Dispatch(ctx context.Context, in *Object, opts ...grpc.CallOption) (*Object, error)
	DispatchEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*EventReply, error)
}

func NewDispatcherClient

func NewDispatcherClient(cc *grpc.ClientConn) DispatcherClient

type DispatcherServer

type DispatcherServer interface {
	Dispatch(context.Context, *Object) (*Object, error)
	DispatchEvent(context.Context, *Event) (*EventReply, error)
}

type Event

type Event struct {
	Payload string `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
}

func (*Event) Descriptor

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

func (*Event) GetPayload

func (m *Event) GetPayload() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) String() string

type EventReply

type EventReply struct {
}

func (*EventReply) Descriptor

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

func (*EventReply) ProtoMessage

func (*EventReply) ProtoMessage()

func (*EventReply) Reset

func (m *EventReply) Reset()

func (*EventReply) String

func (m *EventReply) String() string

type HookType

type HookType int32
const (
	HookType_Unknown        HookType = 0
	HookType_Pre            HookType = 1
	HookType_Post           HookType = 2
	HookType_PostKeyAuth    HookType = 3
	HookType_CustomKeyCheck HookType = 4
)

func (HookType) EnumDescriptor

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

func (HookType) String

func (x HookType) String() string

type JWTData

type JWTData struct {
	Secret string `protobuf:"bytes,1,opt,name=secret" json:"secret,omitempty"`
}

func (*JWTData) Descriptor

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

func (*JWTData) GetSecret

func (m *JWTData) GetSecret() string

func (*JWTData) ProtoMessage

func (*JWTData) ProtoMessage()

func (*JWTData) Reset

func (m *JWTData) Reset()

func (*JWTData) String

func (m *JWTData) String() string

type MiniRequestObject

type MiniRequestObject struct {
	Headers         map[string]string `` /* 134-byte string literal not displayed */
	SetHeaders      map[string]string `` /* 158-byte string literal not displayed */
	DeleteHeaders   []string          `protobuf:"bytes,3,rep,name=delete_headers,json=deleteHeaders" json:"delete_headers,omitempty"`
	Body            string            `protobuf:"bytes,4,opt,name=body" json:"body,omitempty"`
	Url             string            `protobuf:"bytes,5,opt,name=url" json:"url,omitempty"`
	Params          map[string]string `` /* 132-byte string literal not displayed */
	AddParams       map[string]string `` /* 155-byte string literal not displayed */
	ExtendedParams  map[string]string `` /* 170-byte string literal not displayed */
	DeleteParams    []string          `protobuf:"bytes,9,rep,name=delete_params,json=deleteParams" json:"delete_params,omitempty"`
	ReturnOverrides *ReturnOverrides  `protobuf:"bytes,10,opt,name=return_overrides,json=returnOverrides" json:"return_overrides,omitempty"`
	Method          string            `protobuf:"bytes,11,opt,name=method" json:"method,omitempty"`
	RequestUri      string            `protobuf:"bytes,12,opt,name=request_uri,json=requestUri" json:"request_uri,omitempty"`
	Scheme          string            `protobuf:"bytes,13,opt,name=scheme" json:"scheme,omitempty"`
	RawBody         []byte            `protobuf:"bytes,14,opt,name=raw_body,json=rawBody,proto3" json:"raw_body,omitempty"`
}

func (*MiniRequestObject) Descriptor

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

func (*MiniRequestObject) GetAddParams

func (m *MiniRequestObject) GetAddParams() map[string]string

func (*MiniRequestObject) GetBody

func (m *MiniRequestObject) GetBody() string

func (*MiniRequestObject) GetDeleteHeaders

func (m *MiniRequestObject) GetDeleteHeaders() []string

func (*MiniRequestObject) GetDeleteParams

func (m *MiniRequestObject) GetDeleteParams() []string

func (*MiniRequestObject) GetExtendedParams

func (m *MiniRequestObject) GetExtendedParams() map[string]string

func (*MiniRequestObject) GetHeaders

func (m *MiniRequestObject) GetHeaders() map[string]string

func (*MiniRequestObject) GetMethod

func (m *MiniRequestObject) GetMethod() string

func (*MiniRequestObject) GetParams

func (m *MiniRequestObject) GetParams() map[string]string

func (*MiniRequestObject) GetRawBody

func (m *MiniRequestObject) GetRawBody() []byte

func (*MiniRequestObject) GetRequestUri

func (m *MiniRequestObject) GetRequestUri() string

func (*MiniRequestObject) GetReturnOverrides

func (m *MiniRequestObject) GetReturnOverrides() *ReturnOverrides

func (*MiniRequestObject) GetScheme

func (m *MiniRequestObject) GetScheme() string

func (*MiniRequestObject) GetSetHeaders

func (m *MiniRequestObject) GetSetHeaders() map[string]string

func (*MiniRequestObject) GetUrl

func (m *MiniRequestObject) GetUrl() string

func (*MiniRequestObject) ProtoMessage

func (*MiniRequestObject) ProtoMessage()

func (*MiniRequestObject) Reset

func (m *MiniRequestObject) Reset()

func (*MiniRequestObject) String

func (m *MiniRequestObject) String() string

type Monitor

type Monitor struct {
	TriggerLimits []float64 `protobuf:"fixed64,1,rep,packed,name=trigger_limits,json=triggerLimits" json:"trigger_limits,omitempty"`
}

func (*Monitor) Descriptor

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

func (*Monitor) GetTriggerLimits

func (m *Monitor) GetTriggerLimits() []float64

func (*Monitor) ProtoMessage

func (*Monitor) ProtoMessage()

func (*Monitor) Reset

func (m *Monitor) Reset()

func (*Monitor) String

func (m *Monitor) String() string

type Object

type Object struct {
	HookType HookType           `protobuf:"varint,1,opt,name=hook_type,json=hookType,enum=coprocess.HookType" json:"hook_type,omitempty"`
	HookName string             `protobuf:"bytes,2,opt,name=hook_name,json=hookName" json:"hook_name,omitempty"`
	Request  *MiniRequestObject `protobuf:"bytes,3,opt,name=request" json:"request,omitempty"`
	Session  *SessionState      `protobuf:"bytes,4,opt,name=session" json:"session,omitempty"`
	Metadata map[string]string  `` /* 136-byte string literal not displayed */
	Spec     map[string]string  `` /* 128-byte string literal not displayed */
}

func (*Object) Descriptor

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

func (*Object) GetHookName

func (m *Object) GetHookName() string

func (*Object) GetHookType

func (m *Object) GetHookType() HookType

func (*Object) GetMetadata

func (m *Object) GetMetadata() map[string]string

func (*Object) GetRequest

func (m *Object) GetRequest() *MiniRequestObject

func (*Object) GetSession

func (m *Object) GetSession() *SessionState

func (*Object) GetSpec

func (m *Object) GetSpec() map[string]string

func (*Object) ProtoMessage

func (*Object) ProtoMessage()

func (*Object) Reset

func (m *Object) Reset()

func (*Object) String

func (m *Object) String() string

type ReturnOverrides

type ReturnOverrides struct {
	ResponseCode  int32             `protobuf:"varint,1,opt,name=response_code,json=responseCode" json:"response_code,omitempty"`
	ResponseError string            `protobuf:"bytes,2,opt,name=response_error,json=responseError" json:"response_error,omitempty"`
	Headers       map[string]string `` /* 134-byte string literal not displayed */
}

func (*ReturnOverrides) Descriptor

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

func (*ReturnOverrides) GetHeaders

func (m *ReturnOverrides) GetHeaders() map[string]string

func (*ReturnOverrides) GetResponseCode

func (m *ReturnOverrides) GetResponseCode() int32

func (*ReturnOverrides) GetResponseError

func (m *ReturnOverrides) GetResponseError() string

func (*ReturnOverrides) ProtoMessage

func (*ReturnOverrides) ProtoMessage()

func (*ReturnOverrides) Reset

func (m *ReturnOverrides) Reset()

func (*ReturnOverrides) String

func (m *ReturnOverrides) String() string

type SessionState

type SessionState struct {
	LastCheck               int64                        `protobuf:"varint,1,opt,name=last_check,json=lastCheck" json:"last_check,omitempty"`
	Allowance               float64                      `protobuf:"fixed64,2,opt,name=allowance" json:"allowance,omitempty"`
	Rate                    float64                      `protobuf:"fixed64,3,opt,name=rate" json:"rate,omitempty"`
	Per                     float64                      `protobuf:"fixed64,4,opt,name=per" json:"per,omitempty"`
	Expires                 int64                        `protobuf:"varint,5,opt,name=expires" json:"expires,omitempty"`
	QuotaMax                int64                        `protobuf:"varint,6,opt,name=quota_max,json=quotaMax" json:"quota_max,omitempty"`
	QuotaRenews             int64                        `protobuf:"varint,7,opt,name=quota_renews,json=quotaRenews" json:"quota_renews,omitempty"`
	QuotaRemaining          int64                        `protobuf:"varint,8,opt,name=quota_remaining,json=quotaRemaining" json:"quota_remaining,omitempty"`
	QuotaRenewalRate        int64                        `protobuf:"varint,9,opt,name=quota_renewal_rate,json=quotaRenewalRate" json:"quota_renewal_rate,omitempty"`
	AccessRights            map[string]*AccessDefinition `` /* 165-byte string literal not displayed */
	OrgId                   string                       `protobuf:"bytes,11,opt,name=org_id,json=orgId" json:"org_id,omitempty"`
	OauthClientId           string                       `protobuf:"bytes,12,opt,name=oauth_client_id,json=oauthClientId" json:"oauth_client_id,omitempty"`
	OauthKeys               map[string]string            `` /* 156-byte string literal not displayed */
	BasicAuthData           *BasicAuthData               `protobuf:"bytes,14,opt,name=basic_auth_data,json=basicAuthData" json:"basic_auth_data,omitempty"`
	JwtData                 *JWTData                     `protobuf:"bytes,15,opt,name=jwt_data,json=jwtData" json:"jwt_data,omitempty"`
	HmacEnabled             bool                         `protobuf:"varint,16,opt,name=hmac_enabled,json=hmacEnabled" json:"hmac_enabled,omitempty"`
	HmacSecret              string                       `protobuf:"bytes,17,opt,name=hmac_secret,json=hmacSecret" json:"hmac_secret,omitempty"`
	IsInactive              bool                         `protobuf:"varint,18,opt,name=is_inactive,json=isInactive" json:"is_inactive,omitempty"`
	ApplyPolicyId           string                       `protobuf:"bytes,19,opt,name=apply_policy_id,json=applyPolicyId" json:"apply_policy_id,omitempty"`
	DataExpires             int64                        `protobuf:"varint,20,opt,name=data_expires,json=dataExpires" json:"data_expires,omitempty"`
	Monitor                 *Monitor                     `protobuf:"bytes,21,opt,name=monitor" json:"monitor,omitempty"`
	EnableDetailedRecording bool                         `` /* 127-byte string literal not displayed */
	Metadata                map[string]string            `` /* 137-byte string literal not displayed */
	Tags                    []string                     `protobuf:"bytes,24,rep,name=tags" json:"tags,omitempty"`
	Alias                   string                       `protobuf:"bytes,25,opt,name=alias" json:"alias,omitempty"`
	LastUpdated             string                       `protobuf:"bytes,26,opt,name=last_updated,json=lastUpdated" json:"last_updated,omitempty"`
	IdExtractorDeadline     int64                        `protobuf:"varint,27,opt,name=id_extractor_deadline,json=idExtractorDeadline" json:"id_extractor_deadline,omitempty"`
	SessionLifetime         int64                        `protobuf:"varint,28,opt,name=session_lifetime,json=sessionLifetime" json:"session_lifetime,omitempty"`
	ApplyPolicies           []string                     `protobuf:"bytes,29,rep,name=apply_policies,json=applyPolicies" json:"apply_policies,omitempty"`
	Certificate             string                       `protobuf:"bytes,30,opt,name=certificate" json:"certificate,omitempty"`
}

func (*SessionState) Descriptor

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

func (*SessionState) GetAccessRights

func (m *SessionState) GetAccessRights() map[string]*AccessDefinition

func (*SessionState) GetAlias

func (m *SessionState) GetAlias() string

func (*SessionState) GetAllowance

func (m *SessionState) GetAllowance() float64

func (*SessionState) GetApplyPolicies

func (m *SessionState) GetApplyPolicies() []string

func (*SessionState) GetApplyPolicyId

func (m *SessionState) GetApplyPolicyId() string

func (*SessionState) GetBasicAuthData

func (m *SessionState) GetBasicAuthData() *BasicAuthData

func (*SessionState) GetCertificate

func (m *SessionState) GetCertificate() string

func (*SessionState) GetDataExpires

func (m *SessionState) GetDataExpires() int64

func (*SessionState) GetEnableDetailedRecording

func (m *SessionState) GetEnableDetailedRecording() bool

func (*SessionState) GetExpires

func (m *SessionState) GetExpires() int64

func (*SessionState) GetHmacEnabled

func (m *SessionState) GetHmacEnabled() bool

func (*SessionState) GetHmacSecret

func (m *SessionState) GetHmacSecret() string

func (*SessionState) GetIdExtractorDeadline

func (m *SessionState) GetIdExtractorDeadline() int64

func (*SessionState) GetIsInactive

func (m *SessionState) GetIsInactive() bool

func (*SessionState) GetJwtData

func (m *SessionState) GetJwtData() *JWTData

func (*SessionState) GetLastCheck

func (m *SessionState) GetLastCheck() int64

func (*SessionState) GetLastUpdated

func (m *SessionState) GetLastUpdated() string

func (*SessionState) GetMetadata

func (m *SessionState) GetMetadata() map[string]string

func (*SessionState) GetMonitor

func (m *SessionState) GetMonitor() *Monitor

func (*SessionState) GetOauthClientId

func (m *SessionState) GetOauthClientId() string

func (*SessionState) GetOauthKeys

func (m *SessionState) GetOauthKeys() map[string]string

func (*SessionState) GetOrgId

func (m *SessionState) GetOrgId() string

func (*SessionState) GetPer

func (m *SessionState) GetPer() float64

func (*SessionState) GetQuotaMax

func (m *SessionState) GetQuotaMax() int64

func (*SessionState) GetQuotaRemaining

func (m *SessionState) GetQuotaRemaining() int64

func (*SessionState) GetQuotaRenewalRate

func (m *SessionState) GetQuotaRenewalRate() int64

func (*SessionState) GetQuotaRenews

func (m *SessionState) GetQuotaRenews() int64

func (*SessionState) GetRate

func (m *SessionState) GetRate() float64

func (*SessionState) GetSessionLifetime

func (m *SessionState) GetSessionLifetime() int64

func (*SessionState) GetTags

func (m *SessionState) GetTags() []string

func (*SessionState) ProtoMessage

func (*SessionState) ProtoMessage()

func (*SessionState) Reset

func (m *SessionState) Reset()

func (*SessionState) String

func (m *SessionState) String() string

type StringSlice

type StringSlice struct {
	Items []string `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
}

func (*StringSlice) Descriptor

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

func (*StringSlice) GetItems

func (m *StringSlice) GetItems() []string

func (*StringSlice) ProtoMessage

func (*StringSlice) ProtoMessage()

func (*StringSlice) Reset

func (m *StringSlice) Reset()

func (*StringSlice) String

func (m *StringSlice) String() string

Jump to

Keyboard shortcuts

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