Documentation ¶
Overview ¶
Package pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package pb is a generated GoMock package.
Index ¶
- Variables
- func RegisterC2AutomationEngineHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterC2AutomationEngineHandlerClient(ctx context.Context, mux *runtime.ServeMux, client C2AutomationEngineClient) error
- func RegisterC2AutomationEngineHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterC2AutomationEngineHandlerServer(ctx context.Context, mux *runtime.ServeMux, server C2AutomationEngineServer) error
- func RegisterC2AutomationEngineServer(s *grpc.Server, srv C2AutomationEngineServer)
- type ActionType
- type AddRuleRequest
- func (*AddRuleRequest) Descriptor() ([]byte, []int)
- func (m *AddRuleRequest) GetAction() ActionType
- func (m *AddRuleRequest) GetDescription() string
- func (m *AddRuleRequest) GetTargets() []*Target
- func (m *AddRuleRequest) GetTriggers() []*Trigger
- func (*AddRuleRequest) ProtoMessage()
- func (m *AddRuleRequest) Reset()
- func (m *AddRuleRequest) String() string
- func (m *AddRuleRequest) XXX_DiscardUnknown()
- func (m *AddRuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AddRuleRequest) XXX_Merge(src proto.Message)
- func (m *AddRuleRequest) XXX_Size() int
- func (m *AddRuleRequest) XXX_Unmarshal(b []byte) error
- type C2AutomationEngineClient
- type C2AutomationEngineServer
- type C2PbClient
- type C2PbClientFactory
- type DeleteRuleRequest
- func (*DeleteRuleRequest) Descriptor() ([]byte, []int)
- func (m *DeleteRuleRequest) GetRuleId() int32
- func (*DeleteRuleRequest) ProtoMessage()
- func (m *DeleteRuleRequest) Reset()
- func (m *DeleteRuleRequest) String() string
- func (m *DeleteRuleRequest) XXX_DiscardUnknown()
- func (m *DeleteRuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DeleteRuleRequest) XXX_Merge(src proto.Message)
- func (m *DeleteRuleRequest) XXX_Size() int
- func (m *DeleteRuleRequest) XXX_Unmarshal(b []byte) error
- type DeleteRuleResponse
- func (*DeleteRuleResponse) Descriptor() ([]byte, []int)
- func (m *DeleteRuleResponse) GetRuleId() int32
- func (*DeleteRuleResponse) ProtoMessage()
- func (m *DeleteRuleResponse) Reset()
- func (m *DeleteRuleResponse) String() string
- func (m *DeleteRuleResponse) XXX_DiscardUnknown()
- func (m *DeleteRuleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DeleteRuleResponse) XXX_Merge(src proto.Message)
- func (m *DeleteRuleResponse) XXX_Size() int
- func (m *DeleteRuleResponse) XXX_Unmarshal(b []byte) error
- type EventType
- type GetRuleRequest
- func (*GetRuleRequest) Descriptor() ([]byte, []int)
- func (m *GetRuleRequest) GetRuleId() int32
- func (*GetRuleRequest) ProtoMessage()
- func (m *GetRuleRequest) Reset()
- func (m *GetRuleRequest) String() string
- func (m *GetRuleRequest) XXX_DiscardUnknown()
- func (m *GetRuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetRuleRequest) XXX_Merge(src proto.Message)
- func (m *GetRuleRequest) XXX_Size() int
- func (m *GetRuleRequest) XXX_Unmarshal(b []byte) error
- type HealthCheckRequest
- func (*HealthCheckRequest) Descriptor() ([]byte, []int)
- func (*HealthCheckRequest) ProtoMessage()
- func (m *HealthCheckRequest) Reset()
- func (m *HealthCheckRequest) String() string
- func (m *HealthCheckRequest) XXX_DiscardUnknown()
- func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HealthCheckRequest) XXX_Merge(src proto.Message)
- func (m *HealthCheckRequest) XXX_Size() int
- func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error
- type HealthCheckResponse
- func (*HealthCheckResponse) Descriptor() ([]byte, []int)
- func (m *HealthCheckResponse) GetCode() int64
- func (m *HealthCheckResponse) GetStatus() string
- func (*HealthCheckResponse) ProtoMessage()
- func (m *HealthCheckResponse) Reset()
- func (m *HealthCheckResponse) String() string
- func (m *HealthCheckResponse) XXX_DiscardUnknown()
- func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HealthCheckResponse) XXX_Merge(src proto.Message)
- func (m *HealthCheckResponse) XXX_Size() int
- func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error
- type ListRulesRequest
- func (*ListRulesRequest) Descriptor() ([]byte, []int)
- func (*ListRulesRequest) ProtoMessage()
- func (m *ListRulesRequest) Reset()
- func (m *ListRulesRequest) String() string
- func (m *ListRulesRequest) XXX_DiscardUnknown()
- func (m *ListRulesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListRulesRequest) XXX_Merge(src proto.Message)
- func (m *ListRulesRequest) XXX_Size() int
- func (m *ListRulesRequest) XXX_Unmarshal(b []byte) error
- type MockC2PbClient
- func (m *MockC2PbClient) Close() error
- func (m *MockC2PbClient) CountClients(arg0 context.Context, arg1 *pb0.CountClientsRequest, arg2 ...grpc.CallOption) (*pb0.CountClientsResponse, error)
- func (m *MockC2PbClient) CountClientsForTopic(arg0 context.Context, arg1 *pb0.CountClientsForTopicRequest, ...) (*pb0.CountClientsForTopicResponse, error)
- func (m *MockC2PbClient) CountTopics(arg0 context.Context, arg1 *pb0.CountTopicsRequest, arg2 ...grpc.CallOption) (*pb0.CountTopicsResponse, error)
- func (m *MockC2PbClient) CountTopicsForClient(arg0 context.Context, arg1 *pb0.CountTopicsForClientRequest, ...) (*pb0.CountTopicsForClientResponse, error)
- func (m *MockC2PbClient) EXPECT() *MockC2PbClientMockRecorder
- func (m *MockC2PbClient) GetClients(arg0 context.Context, arg1 *pb0.GetClientsRequest, arg2 ...grpc.CallOption) (*pb0.GetClientsResponse, error)
- func (m *MockC2PbClient) GetClientsForTopic(arg0 context.Context, arg1 *pb0.GetClientsForTopicRequest, ...) (*pb0.GetClientsForTopicResponse, error)
- func (m *MockC2PbClient) GetTopics(arg0 context.Context, arg1 *pb0.GetTopicsRequest, arg2 ...grpc.CallOption) (*pb0.GetTopicsResponse, error)
- func (m *MockC2PbClient) GetTopicsForClient(arg0 context.Context, arg1 *pb0.GetTopicsForClientRequest, ...) (*pb0.GetTopicsForClientResponse, error)
- func (m *MockC2PbClient) NewClient(arg0 context.Context, arg1 *pb0.NewClientRequest, arg2 ...grpc.CallOption) (*pb0.NewClientResponse, error)
- func (m *MockC2PbClient) NewClientKey(arg0 context.Context, arg1 *pb0.NewClientKeyRequest, arg2 ...grpc.CallOption) (*pb0.NewClientKeyResponse, error)
- func (m *MockC2PbClient) NewTopic(arg0 context.Context, arg1 *pb0.NewTopicRequest, arg2 ...grpc.CallOption) (*pb0.NewTopicResponse, error)
- func (m *MockC2PbClient) NewTopicClient(arg0 context.Context, arg1 *pb0.NewTopicClientRequest, arg2 ...grpc.CallOption) (*pb0.NewTopicClientResponse, error)
- func (m *MockC2PbClient) RemoveClient(arg0 context.Context, arg1 *pb0.RemoveClientRequest, arg2 ...grpc.CallOption) (*pb0.RemoveClientResponse, error)
- func (m *MockC2PbClient) RemoveTopic(arg0 context.Context, arg1 *pb0.RemoveTopicRequest, arg2 ...grpc.CallOption) (*pb0.RemoveTopicResponse, error)
- func (m *MockC2PbClient) RemoveTopicClient(arg0 context.Context, arg1 *pb0.RemoveTopicClientRequest, ...) (*pb0.RemoveTopicClientResponse, error)
- func (m *MockC2PbClient) ResetClient(arg0 context.Context, arg1 *pb0.ResetClientRequest, arg2 ...grpc.CallOption) (*pb0.ResetClientResponse, error)
- func (m *MockC2PbClient) SendMessage(arg0 context.Context, arg1 *pb0.SendMessageRequest, arg2 ...grpc.CallOption) (*pb0.SendMessageResponse, error)
- func (m *MockC2PbClient) SubscribeToEventStream(arg0 context.Context, arg1 *pb0.SubscribeToEventStreamRequest, ...) (pb0.C2_SubscribeToEventStreamClient, error)
- type MockC2PbClientFactory
- type MockC2PbClientFactoryMockRecorder
- type MockC2PbClientMockRecorder
- func (mr *MockC2PbClientMockRecorder) Close() *gomock.Call
- func (mr *MockC2PbClientMockRecorder) CountClients(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) CountClientsForTopic(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) CountTopics(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) CountTopicsForClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) GetClients(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) GetClientsForTopic(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) GetTopics(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) GetTopicsForClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) NewClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) NewClientKey(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) NewTopic(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) NewTopicClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) RemoveClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) RemoveTopic(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) RemoveTopicClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) ResetClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) SendMessage(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockC2PbClientMockRecorder) SubscribeToEventStream(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- type Rule
- func (*Rule) Descriptor() ([]byte, []int)
- func (m *Rule) GetAction() ActionType
- func (m *Rule) GetDescription() string
- func (m *Rule) GetId() int32
- func (m *Rule) GetLastExecuted() *timestamp.Timestamp
- func (m *Rule) GetTargets() []*Target
- func (m *Rule) GetTriggers() []*Trigger
- func (*Rule) ProtoMessage()
- func (m *Rule) Reset()
- func (m *Rule) String() string
- func (m *Rule) XXX_DiscardUnknown()
- func (m *Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Rule) XXX_Merge(src proto.Message)
- func (m *Rule) XXX_Size() int
- func (m *Rule) XXX_Unmarshal(b []byte) error
- type RuleResponse
- func (*RuleResponse) Descriptor() ([]byte, []int)
- func (m *RuleResponse) GetRule() *Rule
- func (*RuleResponse) ProtoMessage()
- func (m *RuleResponse) Reset()
- func (m *RuleResponse) String() string
- func (m *RuleResponse) XXX_DiscardUnknown()
- func (m *RuleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RuleResponse) XXX_Merge(src proto.Message)
- func (m *RuleResponse) XXX_Size() int
- func (m *RuleResponse) XXX_Unmarshal(b []byte) error
- type RulesResponse
- func (*RulesResponse) Descriptor() ([]byte, []int)
- func (m *RulesResponse) GetRules() []*Rule
- func (*RulesResponse) ProtoMessage()
- func (m *RulesResponse) Reset()
- func (m *RulesResponse) String() string
- func (m *RulesResponse) XXX_DiscardUnknown()
- func (m *RulesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RulesResponse) XXX_Merge(src proto.Message)
- func (m *RulesResponse) XXX_Size() int
- func (m *RulesResponse) XXX_Unmarshal(b []byte) error
- type Target
- func (*Target) Descriptor() ([]byte, []int)
- func (m *Target) GetExpr() string
- func (m *Target) GetId() int32
- func (m *Target) GetType() TargetType
- func (*Target) ProtoMessage()
- func (m *Target) Reset()
- func (m *Target) String() string
- func (m *Target) XXX_DiscardUnknown()
- func (m *Target) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Target) XXX_Merge(src proto.Message)
- func (m *Target) XXX_Size() int
- func (m *Target) XXX_Unmarshal(b []byte) error
- type TargetType
- type Trigger
- func (*Trigger) Descriptor() ([]byte, []int)
- func (m *Trigger) GetId() int32
- func (m *Trigger) GetSettings() []byte
- func (m *Trigger) GetType() TriggerType
- func (t *Trigger) MarshalJSON() ([]byte, error)
- func (*Trigger) ProtoMessage()
- func (m *Trigger) Reset()
- func (m *Trigger) String() string
- func (m *Trigger) XXX_DiscardUnknown()
- func (m *Trigger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Trigger) XXX_Merge(src proto.Message)
- func (m *Trigger) XXX_Size() int
- func (m *Trigger) XXX_Unmarshal(b []byte) error
- type TriggerSettings
- type TriggerSettingsEvent
- type TriggerSettingsTimeInterval
- type TriggerType
- type UnimplementedC2AutomationEngineServer
- func (*UnimplementedC2AutomationEngineServer) AddRule(ctx context.Context, req *AddRuleRequest) (*RuleResponse, error)
- func (*UnimplementedC2AutomationEngineServer) DeleteRule(ctx context.Context, req *DeleteRuleRequest) (*DeleteRuleResponse, error)
- func (*UnimplementedC2AutomationEngineServer) GetRule(ctx context.Context, req *GetRuleRequest) (*RuleResponse, error)
- func (*UnimplementedC2AutomationEngineServer) HealthCheck(ctx context.Context, req *HealthCheckRequest) (*HealthCheckResponse, error)
- func (*UnimplementedC2AutomationEngineServer) ListRules(ctx context.Context, req *ListRulesRequest) (*RulesResponse, error)
- func (*UnimplementedC2AutomationEngineServer) UpdateRule(ctx context.Context, req *UpdateRuleRequest) (*RuleResponse, error)
- type UpdateRuleRequest
- func (*UpdateRuleRequest) Descriptor() ([]byte, []int)
- func (m *UpdateRuleRequest) GetAction() ActionType
- func (m *UpdateRuleRequest) GetDescription() string
- func (m *UpdateRuleRequest) GetRuleId() int32
- func (m *UpdateRuleRequest) GetTargets() []*Target
- func (m *UpdateRuleRequest) GetTriggers() []*Trigger
- func (*UpdateRuleRequest) ProtoMessage()
- func (m *UpdateRuleRequest) Reset()
- func (m *UpdateRuleRequest) String() string
- func (m *UpdateRuleRequest) XXX_DiscardUnknown()
- func (m *UpdateRuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UpdateRuleRequest) XXX_Merge(src proto.Message)
- func (m *UpdateRuleRequest) XXX_Size() int
- func (m *UpdateRuleRequest) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ActionType_name = map[int32]string{
0: "UNDEFINED_ACTION",
1: "KEY_ROTATION",
}
var ActionType_value = map[string]int32{
"UNDEFINED_ACTION": 0,
"KEY_ROTATION": 1,
}
var TargetType_name = map[int32]string{
0: "ANY",
1: "TOPIC",
2: "CLIENT",
}
var TargetType_value = map[string]int32{
"ANY": 0,
"TOPIC": 1,
"CLIENT": 2,
}
var TriggerType_name = map[int32]string{
0: "UNDEFINED_TRIGGER",
1: "TIME_INTERVAL",
2: "EVENT",
}
var TriggerType_value = map[string]int32{
"UNDEFINED_TRIGGER": 0,
"TIME_INTERVAL": 1,
"EVENT": 2,
}
Functions ¶
func RegisterC2AutomationEngineHandler ¶
func RegisterC2AutomationEngineHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterC2AutomationEngineHandler registers the http handlers for service C2AutomationEngine to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterC2AutomationEngineHandlerClient ¶
func RegisterC2AutomationEngineHandlerClient(ctx context.Context, mux *runtime.ServeMux, client C2AutomationEngineClient) error
RegisterC2AutomationEngineHandlerClient registers the http handlers for service C2AutomationEngine to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "C2AutomationEngineClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "C2AutomationEngineClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "C2AutomationEngineClient" to call the correct interceptors.
func RegisterC2AutomationEngineHandlerFromEndpoint ¶
func RegisterC2AutomationEngineHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterC2AutomationEngineHandlerFromEndpoint is same as RegisterC2AutomationEngineHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterC2AutomationEngineHandlerServer ¶
func RegisterC2AutomationEngineHandlerServer(ctx context.Context, mux *runtime.ServeMux, server C2AutomationEngineServer) error
RegisterC2AutomationEngineHandlerServer registers the http handlers for service C2AutomationEngine to "mux". UnaryRPC :call C2AutomationEngineServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterC2AutomationEngineServer ¶
func RegisterC2AutomationEngineServer(s *grpc.Server, srv C2AutomationEngineServer)
Types ¶
type ActionType ¶
type ActionType int32
List of supported ActionType
const ( ActionType_UNDEFINED_ACTION ActionType = 0 ActionType_KEY_ROTATION ActionType = 1 )
func (ActionType) EnumDescriptor ¶
func (ActionType) EnumDescriptor() ([]byte, []int)
func (ActionType) String ¶
func (x ActionType) String() string
type AddRuleRequest ¶
type AddRuleRequest struct { Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` Action ActionType `protobuf:"varint,2,opt,name=action,proto3,enum=pb.ActionType" json:"action,omitempty"` Triggers []*Trigger `protobuf:"bytes,3,rep,name=triggers,proto3" json:"triggers,omitempty"` Targets []*Target `protobuf:"bytes,4,rep,name=targets,proto3" json:"targets,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AddRuleRequest) Descriptor ¶
func (*AddRuleRequest) Descriptor() ([]byte, []int)
func (*AddRuleRequest) GetAction ¶
func (m *AddRuleRequest) GetAction() ActionType
func (*AddRuleRequest) GetDescription ¶
func (m *AddRuleRequest) GetDescription() string
func (*AddRuleRequest) GetTargets ¶
func (m *AddRuleRequest) GetTargets() []*Target
func (*AddRuleRequest) GetTriggers ¶
func (m *AddRuleRequest) GetTriggers() []*Trigger
func (*AddRuleRequest) ProtoMessage ¶
func (*AddRuleRequest) ProtoMessage()
func (*AddRuleRequest) Reset ¶
func (m *AddRuleRequest) Reset()
func (*AddRuleRequest) String ¶
func (m *AddRuleRequest) String() string
func (*AddRuleRequest) XXX_DiscardUnknown ¶
func (m *AddRuleRequest) XXX_DiscardUnknown()
func (*AddRuleRequest) XXX_Marshal ¶
func (m *AddRuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AddRuleRequest) XXX_Merge ¶
func (m *AddRuleRequest) XXX_Merge(src proto.Message)
func (*AddRuleRequest) XXX_Size ¶
func (m *AddRuleRequest) XXX_Size() int
func (*AddRuleRequest) XXX_Unmarshal ¶
func (m *AddRuleRequest) XXX_Unmarshal(b []byte) error
type C2AutomationEngineClient ¶
type C2AutomationEngineClient interface { // Retrieve list of existing rules ListRules(ctx context.Context, in *ListRulesRequest, opts ...grpc.CallOption) (*RulesResponse, error) // Retrieve a single rule, by its ID GetRule(ctx context.Context, in *GetRuleRequest, opts ...grpc.CallOption) (*RuleResponse, error) // Create a new rule AddRule(ctx context.Context, in *AddRuleRequest, opts ...grpc.CallOption) (*RuleResponse, error) // Update an existing rule UpdateRule(ctx context.Context, in *UpdateRuleRequest, opts ...grpc.CallOption) (*RuleResponse, error) // Remove a rule DeleteRule(ctx context.Context, in *DeleteRuleRequest, opts ...grpc.CallOption) (*DeleteRuleResponse, error) HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) }
C2AutomationEngineClient is the client API for C2AutomationEngine service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewC2AutomationEngineClient ¶
func NewC2AutomationEngineClient(cc grpc.ClientConnInterface) C2AutomationEngineClient
type C2AutomationEngineServer ¶
type C2AutomationEngineServer interface { // Retrieve list of existing rules ListRules(context.Context, *ListRulesRequest) (*RulesResponse, error) // Retrieve a single rule, by its ID GetRule(context.Context, *GetRuleRequest) (*RuleResponse, error) // Create a new rule AddRule(context.Context, *AddRuleRequest) (*RuleResponse, error) // Update an existing rule UpdateRule(context.Context, *UpdateRuleRequest) (*RuleResponse, error) // Remove a rule DeleteRule(context.Context, *DeleteRuleRequest) (*DeleteRuleResponse, error) HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) }
C2AutomationEngineServer is the server API for C2AutomationEngine service.
type C2PbClient ¶
C2PbClient wrap e4.C2Client in a local interface and provide a way to close its connection
type C2PbClientFactory ¶
type C2PbClientFactory interface {
Create() (C2PbClient, error)
}
C2PbClientFactory defines a factory creating C2PbClient
func NewC2PbClientFactory ¶
func NewC2PbClientFactory(endpoint string, certPath string) (C2PbClientFactory, error)
NewC2PbClientFactory creates a new factory for C2 protobuf client
type DeleteRuleRequest ¶
type DeleteRuleRequest struct { RuleId int32 `protobuf:"varint,1,opt,name=ruleId,proto3" json:"ruleId,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DeleteRuleRequest) Descriptor ¶
func (*DeleteRuleRequest) Descriptor() ([]byte, []int)
func (*DeleteRuleRequest) GetRuleId ¶
func (m *DeleteRuleRequest) GetRuleId() int32
func (*DeleteRuleRequest) ProtoMessage ¶
func (*DeleteRuleRequest) ProtoMessage()
func (*DeleteRuleRequest) Reset ¶
func (m *DeleteRuleRequest) Reset()
func (*DeleteRuleRequest) String ¶
func (m *DeleteRuleRequest) String() string
func (*DeleteRuleRequest) XXX_DiscardUnknown ¶
func (m *DeleteRuleRequest) XXX_DiscardUnknown()
func (*DeleteRuleRequest) XXX_Marshal ¶
func (m *DeleteRuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeleteRuleRequest) XXX_Merge ¶
func (m *DeleteRuleRequest) XXX_Merge(src proto.Message)
func (*DeleteRuleRequest) XXX_Size ¶
func (m *DeleteRuleRequest) XXX_Size() int
func (*DeleteRuleRequest) XXX_Unmarshal ¶
func (m *DeleteRuleRequest) XXX_Unmarshal(b []byte) error
type DeleteRuleResponse ¶
type DeleteRuleResponse struct { RuleId int32 `protobuf:"varint,1,opt,name=ruleId,proto3" json:"ruleId,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DeleteRuleResponse) Descriptor ¶
func (*DeleteRuleResponse) Descriptor() ([]byte, []int)
func (*DeleteRuleResponse) GetRuleId ¶
func (m *DeleteRuleResponse) GetRuleId() int32
func (*DeleteRuleResponse) ProtoMessage ¶
func (*DeleteRuleResponse) ProtoMessage()
func (*DeleteRuleResponse) Reset ¶
func (m *DeleteRuleResponse) Reset()
func (*DeleteRuleResponse) String ¶
func (m *DeleteRuleResponse) String() string
func (*DeleteRuleResponse) XXX_DiscardUnknown ¶
func (m *DeleteRuleResponse) XXX_DiscardUnknown()
func (*DeleteRuleResponse) XXX_Marshal ¶
func (m *DeleteRuleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeleteRuleResponse) XXX_Merge ¶
func (m *DeleteRuleResponse) XXX_Merge(src proto.Message)
func (*DeleteRuleResponse) XXX_Size ¶
func (m *DeleteRuleResponse) XXX_Size() int
func (*DeleteRuleResponse) XXX_Unmarshal ¶
func (m *DeleteRuleResponse) XXX_Unmarshal(b []byte) error
type EventType ¶
type EventType string
EventType is a custom type for all available Trigger Events
var ( // EventTypeClientSubscribed describes the event emitted when a client subscribe EventTypeClientSubscribed EventType = EventType(c2pb.EventType_CLIENT_SUBSCRIBED.String()) // EventTypeClientUnsubscribed describes the event emitted when a client unsubscribe EventTypeClientUnsubscribed EventType = EventType(c2pb.EventType_CLIENT_UNSUBSCRIBED.String()) )
type GetRuleRequest ¶
type GetRuleRequest struct { RuleId int32 `protobuf:"varint,1,opt,name=ruleId,proto3" json:"ruleId,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetRuleRequest) Descriptor ¶
func (*GetRuleRequest) Descriptor() ([]byte, []int)
func (*GetRuleRequest) GetRuleId ¶
func (m *GetRuleRequest) GetRuleId() int32
func (*GetRuleRequest) ProtoMessage ¶
func (*GetRuleRequest) ProtoMessage()
func (*GetRuleRequest) Reset ¶
func (m *GetRuleRequest) Reset()
func (*GetRuleRequest) String ¶
func (m *GetRuleRequest) String() string
func (*GetRuleRequest) XXX_DiscardUnknown ¶
func (m *GetRuleRequest) XXX_DiscardUnknown()
func (*GetRuleRequest) XXX_Marshal ¶
func (m *GetRuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetRuleRequest) XXX_Merge ¶
func (m *GetRuleRequest) XXX_Merge(src proto.Message)
func (*GetRuleRequest) XXX_Size ¶
func (m *GetRuleRequest) XXX_Size() int
func (*GetRuleRequest) XXX_Unmarshal ¶
func (m *GetRuleRequest) XXX_Unmarshal(b []byte) error
type HealthCheckRequest ¶
type HealthCheckRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HealthCheckRequest) Descriptor ¶
func (*HealthCheckRequest) Descriptor() ([]byte, []int)
func (*HealthCheckRequest) ProtoMessage ¶
func (*HealthCheckRequest) ProtoMessage()
func (*HealthCheckRequest) Reset ¶
func (m *HealthCheckRequest) Reset()
func (*HealthCheckRequest) String ¶
func (m *HealthCheckRequest) String() string
func (*HealthCheckRequest) XXX_DiscardUnknown ¶
func (m *HealthCheckRequest) XXX_DiscardUnknown()
func (*HealthCheckRequest) XXX_Marshal ¶
func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthCheckRequest) XXX_Merge ¶
func (m *HealthCheckRequest) XXX_Merge(src proto.Message)
func (*HealthCheckRequest) XXX_Size ¶
func (m *HealthCheckRequest) XXX_Size() int
func (*HealthCheckRequest) XXX_Unmarshal ¶
func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error
type HealthCheckResponse ¶
type HealthCheckResponse struct { Code int64 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` Status string `protobuf:"bytes,2,opt,name=Status,proto3" json:"Status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HealthCheckResponse) Descriptor ¶
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
func (*HealthCheckResponse) GetCode ¶
func (m *HealthCheckResponse) GetCode() int64
func (*HealthCheckResponse) GetStatus ¶
func (m *HealthCheckResponse) GetStatus() string
func (*HealthCheckResponse) ProtoMessage ¶
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) Reset ¶
func (m *HealthCheckResponse) Reset()
func (*HealthCheckResponse) String ¶
func (m *HealthCheckResponse) String() string
func (*HealthCheckResponse) XXX_DiscardUnknown ¶
func (m *HealthCheckResponse) XXX_DiscardUnknown()
func (*HealthCheckResponse) XXX_Marshal ¶
func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthCheckResponse) XXX_Merge ¶
func (m *HealthCheckResponse) XXX_Merge(src proto.Message)
func (*HealthCheckResponse) XXX_Size ¶
func (m *HealthCheckResponse) XXX_Size() int
func (*HealthCheckResponse) XXX_Unmarshal ¶
func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error
type ListRulesRequest ¶
type ListRulesRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListRulesRequest) Descriptor ¶
func (*ListRulesRequest) Descriptor() ([]byte, []int)
func (*ListRulesRequest) ProtoMessage ¶
func (*ListRulesRequest) ProtoMessage()
func (*ListRulesRequest) Reset ¶
func (m *ListRulesRequest) Reset()
func (*ListRulesRequest) String ¶
func (m *ListRulesRequest) String() string
func (*ListRulesRequest) XXX_DiscardUnknown ¶
func (m *ListRulesRequest) XXX_DiscardUnknown()
func (*ListRulesRequest) XXX_Marshal ¶
func (m *ListRulesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListRulesRequest) XXX_Merge ¶
func (m *ListRulesRequest) XXX_Merge(src proto.Message)
func (*ListRulesRequest) XXX_Size ¶
func (m *ListRulesRequest) XXX_Size() int
func (*ListRulesRequest) XXX_Unmarshal ¶
func (m *ListRulesRequest) XXX_Unmarshal(b []byte) error
type MockC2PbClient ¶
type MockC2PbClient struct {
// contains filtered or unexported fields
}
MockC2PbClient is a mock of C2PbClient interface
func NewMockC2PbClient ¶
func NewMockC2PbClient(ctrl *gomock.Controller) *MockC2PbClient
NewMockC2PbClient creates a new mock instance
func (*MockC2PbClient) CountClients ¶
func (m *MockC2PbClient) CountClients(arg0 context.Context, arg1 *pb0.CountClientsRequest, arg2 ...grpc.CallOption) (*pb0.CountClientsResponse, error)
CountClients mocks base method
func (*MockC2PbClient) CountClientsForTopic ¶
func (m *MockC2PbClient) CountClientsForTopic(arg0 context.Context, arg1 *pb0.CountClientsForTopicRequest, arg2 ...grpc.CallOption) (*pb0.CountClientsForTopicResponse, error)
CountClientsForTopic mocks base method
func (*MockC2PbClient) CountTopics ¶
func (m *MockC2PbClient) CountTopics(arg0 context.Context, arg1 *pb0.CountTopicsRequest, arg2 ...grpc.CallOption) (*pb0.CountTopicsResponse, error)
CountTopics mocks base method
func (*MockC2PbClient) CountTopicsForClient ¶
func (m *MockC2PbClient) CountTopicsForClient(arg0 context.Context, arg1 *pb0.CountTopicsForClientRequest, arg2 ...grpc.CallOption) (*pb0.CountTopicsForClientResponse, error)
CountTopicsForClient mocks base method
func (*MockC2PbClient) EXPECT ¶
func (m *MockC2PbClient) EXPECT() *MockC2PbClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockC2PbClient) GetClients ¶
func (m *MockC2PbClient) GetClients(arg0 context.Context, arg1 *pb0.GetClientsRequest, arg2 ...grpc.CallOption) (*pb0.GetClientsResponse, error)
GetClients mocks base method
func (*MockC2PbClient) GetClientsForTopic ¶
func (m *MockC2PbClient) GetClientsForTopic(arg0 context.Context, arg1 *pb0.GetClientsForTopicRequest, arg2 ...grpc.CallOption) (*pb0.GetClientsForTopicResponse, error)
GetClientsForTopic mocks base method
func (*MockC2PbClient) GetTopics ¶
func (m *MockC2PbClient) GetTopics(arg0 context.Context, arg1 *pb0.GetTopicsRequest, arg2 ...grpc.CallOption) (*pb0.GetTopicsResponse, error)
GetTopics mocks base method
func (*MockC2PbClient) GetTopicsForClient ¶
func (m *MockC2PbClient) GetTopicsForClient(arg0 context.Context, arg1 *pb0.GetTopicsForClientRequest, arg2 ...grpc.CallOption) (*pb0.GetTopicsForClientResponse, error)
GetTopicsForClient mocks base method
func (*MockC2PbClient) NewClient ¶
func (m *MockC2PbClient) NewClient(arg0 context.Context, arg1 *pb0.NewClientRequest, arg2 ...grpc.CallOption) (*pb0.NewClientResponse, error)
NewClient mocks base method
func (*MockC2PbClient) NewClientKey ¶
func (m *MockC2PbClient) NewClientKey(arg0 context.Context, arg1 *pb0.NewClientKeyRequest, arg2 ...grpc.CallOption) (*pb0.NewClientKeyResponse, error)
NewClientKey mocks base method
func (*MockC2PbClient) NewTopic ¶
func (m *MockC2PbClient) NewTopic(arg0 context.Context, arg1 *pb0.NewTopicRequest, arg2 ...grpc.CallOption) (*pb0.NewTopicResponse, error)
NewTopic mocks base method
func (*MockC2PbClient) NewTopicClient ¶
func (m *MockC2PbClient) NewTopicClient(arg0 context.Context, arg1 *pb0.NewTopicClientRequest, arg2 ...grpc.CallOption) (*pb0.NewTopicClientResponse, error)
NewTopicClient mocks base method
func (*MockC2PbClient) RemoveClient ¶
func (m *MockC2PbClient) RemoveClient(arg0 context.Context, arg1 *pb0.RemoveClientRequest, arg2 ...grpc.CallOption) (*pb0.RemoveClientResponse, error)
RemoveClient mocks base method
func (*MockC2PbClient) RemoveTopic ¶
func (m *MockC2PbClient) RemoveTopic(arg0 context.Context, arg1 *pb0.RemoveTopicRequest, arg2 ...grpc.CallOption) (*pb0.RemoveTopicResponse, error)
RemoveTopic mocks base method
func (*MockC2PbClient) RemoveTopicClient ¶
func (m *MockC2PbClient) RemoveTopicClient(arg0 context.Context, arg1 *pb0.RemoveTopicClientRequest, arg2 ...grpc.CallOption) (*pb0.RemoveTopicClientResponse, error)
RemoveTopicClient mocks base method
func (*MockC2PbClient) ResetClient ¶
func (m *MockC2PbClient) ResetClient(arg0 context.Context, arg1 *pb0.ResetClientRequest, arg2 ...grpc.CallOption) (*pb0.ResetClientResponse, error)
ResetClient mocks base method
func (*MockC2PbClient) SendMessage ¶
func (m *MockC2PbClient) SendMessage(arg0 context.Context, arg1 *pb0.SendMessageRequest, arg2 ...grpc.CallOption) (*pb0.SendMessageResponse, error)
SendMessage mocks base method
func (*MockC2PbClient) SubscribeToEventStream ¶
func (m *MockC2PbClient) SubscribeToEventStream(arg0 context.Context, arg1 *pb0.SubscribeToEventStreamRequest, arg2 ...grpc.CallOption) (pb0.C2_SubscribeToEventStreamClient, error)
SubscribeToEventStream mocks base method
type MockC2PbClientFactory ¶
type MockC2PbClientFactory struct {
// contains filtered or unexported fields
}
MockC2PbClientFactory is a mock of C2PbClientFactory interface
func NewMockC2PbClientFactory ¶
func NewMockC2PbClientFactory(ctrl *gomock.Controller) *MockC2PbClientFactory
NewMockC2PbClientFactory creates a new mock instance
func (*MockC2PbClientFactory) Create ¶
func (m *MockC2PbClientFactory) Create() (C2PbClient, error)
Create mocks base method
func (*MockC2PbClientFactory) EXPECT ¶
func (m *MockC2PbClientFactory) EXPECT() *MockC2PbClientFactoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockC2PbClientFactoryMockRecorder ¶
type MockC2PbClientFactoryMockRecorder struct {
// contains filtered or unexported fields
}
MockC2PbClientFactoryMockRecorder is the mock recorder for MockC2PbClientFactory
func (*MockC2PbClientFactoryMockRecorder) Create ¶
func (mr *MockC2PbClientFactoryMockRecorder) Create() *gomock.Call
Create indicates an expected call of Create
type MockC2PbClientMockRecorder ¶
type MockC2PbClientMockRecorder struct {
// contains filtered or unexported fields
}
MockC2PbClientMockRecorder is the mock recorder for MockC2PbClient
func (*MockC2PbClientMockRecorder) Close ¶
func (mr *MockC2PbClientMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockC2PbClientMockRecorder) CountClients ¶
func (mr *MockC2PbClientMockRecorder) CountClients(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
CountClients indicates an expected call of CountClients
func (*MockC2PbClientMockRecorder) CountClientsForTopic ¶
func (mr *MockC2PbClientMockRecorder) CountClientsForTopic(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
CountClientsForTopic indicates an expected call of CountClientsForTopic
func (*MockC2PbClientMockRecorder) CountTopics ¶
func (mr *MockC2PbClientMockRecorder) CountTopics(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
CountTopics indicates an expected call of CountTopics
func (*MockC2PbClientMockRecorder) CountTopicsForClient ¶
func (mr *MockC2PbClientMockRecorder) CountTopicsForClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
CountTopicsForClient indicates an expected call of CountTopicsForClient
func (*MockC2PbClientMockRecorder) GetClients ¶
func (mr *MockC2PbClientMockRecorder) GetClients(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetClients indicates an expected call of GetClients
func (*MockC2PbClientMockRecorder) GetClientsForTopic ¶
func (mr *MockC2PbClientMockRecorder) GetClientsForTopic(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetClientsForTopic indicates an expected call of GetClientsForTopic
func (*MockC2PbClientMockRecorder) GetTopics ¶
func (mr *MockC2PbClientMockRecorder) GetTopics(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetTopics indicates an expected call of GetTopics
func (*MockC2PbClientMockRecorder) GetTopicsForClient ¶
func (mr *MockC2PbClientMockRecorder) GetTopicsForClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetTopicsForClient indicates an expected call of GetTopicsForClient
func (*MockC2PbClientMockRecorder) NewClient ¶
func (mr *MockC2PbClientMockRecorder) NewClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
NewClient indicates an expected call of NewClient
func (*MockC2PbClientMockRecorder) NewClientKey ¶
func (mr *MockC2PbClientMockRecorder) NewClientKey(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
NewClientKey indicates an expected call of NewClientKey
func (*MockC2PbClientMockRecorder) NewTopic ¶
func (mr *MockC2PbClientMockRecorder) NewTopic(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
NewTopic indicates an expected call of NewTopic
func (*MockC2PbClientMockRecorder) NewTopicClient ¶
func (mr *MockC2PbClientMockRecorder) NewTopicClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
NewTopicClient indicates an expected call of NewTopicClient
func (*MockC2PbClientMockRecorder) RemoveClient ¶
func (mr *MockC2PbClientMockRecorder) RemoveClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
RemoveClient indicates an expected call of RemoveClient
func (*MockC2PbClientMockRecorder) RemoveTopic ¶
func (mr *MockC2PbClientMockRecorder) RemoveTopic(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
RemoveTopic indicates an expected call of RemoveTopic
func (*MockC2PbClientMockRecorder) RemoveTopicClient ¶
func (mr *MockC2PbClientMockRecorder) RemoveTopicClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
RemoveTopicClient indicates an expected call of RemoveTopicClient
func (*MockC2PbClientMockRecorder) ResetClient ¶
func (mr *MockC2PbClientMockRecorder) ResetClient(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
ResetClient indicates an expected call of ResetClient
func (*MockC2PbClientMockRecorder) SendMessage ¶
func (mr *MockC2PbClientMockRecorder) SendMessage(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
SendMessage indicates an expected call of SendMessage
func (*MockC2PbClientMockRecorder) SubscribeToEventStream ¶
func (mr *MockC2PbClientMockRecorder) SubscribeToEventStream(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
SubscribeToEventStream indicates an expected call of SubscribeToEventStream
type Rule ¶
type Rule struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Action ActionType `protobuf:"varint,3,opt,name=action,proto3,enum=pb.ActionType" json:"action,omitempty"` LastExecuted *timestamp.Timestamp `protobuf:"bytes,4,opt,name=lastExecuted,proto3" json:"lastExecuted,omitempty"` Triggers []*Trigger `protobuf:"bytes,5,rep,name=triggers,proto3" json:"triggers,omitempty"` Targets []*Target `protobuf:"bytes,6,rep,name=targets,proto3" json:"targets,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Rule) Descriptor ¶
func (*Rule) GetAction ¶
func (m *Rule) GetAction() ActionType
func (*Rule) GetDescription ¶
func (*Rule) GetLastExecuted ¶
func (*Rule) GetTargets ¶
func (*Rule) GetTriggers ¶
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) XXX_DiscardUnknown ¶
func (m *Rule) XXX_DiscardUnknown()
func (*Rule) XXX_Unmarshal ¶
type RuleResponse ¶
type RuleResponse struct { Rule *Rule `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RuleResponse) Descriptor ¶
func (*RuleResponse) Descriptor() ([]byte, []int)
func (*RuleResponse) GetRule ¶
func (m *RuleResponse) GetRule() *Rule
func (*RuleResponse) ProtoMessage ¶
func (*RuleResponse) ProtoMessage()
func (*RuleResponse) Reset ¶
func (m *RuleResponse) Reset()
func (*RuleResponse) String ¶
func (m *RuleResponse) String() string
func (*RuleResponse) XXX_DiscardUnknown ¶
func (m *RuleResponse) XXX_DiscardUnknown()
func (*RuleResponse) XXX_Marshal ¶
func (m *RuleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RuleResponse) XXX_Merge ¶
func (m *RuleResponse) XXX_Merge(src proto.Message)
func (*RuleResponse) XXX_Size ¶
func (m *RuleResponse) XXX_Size() int
func (*RuleResponse) XXX_Unmarshal ¶
func (m *RuleResponse) XXX_Unmarshal(b []byte) error
type RulesResponse ¶
type RulesResponse struct { Rules []*Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RulesResponse) Descriptor ¶
func (*RulesResponse) Descriptor() ([]byte, []int)
func (*RulesResponse) GetRules ¶
func (m *RulesResponse) GetRules() []*Rule
func (*RulesResponse) ProtoMessage ¶
func (*RulesResponse) ProtoMessage()
func (*RulesResponse) Reset ¶
func (m *RulesResponse) Reset()
func (*RulesResponse) String ¶
func (m *RulesResponse) String() string
func (*RulesResponse) XXX_DiscardUnknown ¶
func (m *RulesResponse) XXX_DiscardUnknown()
func (*RulesResponse) XXX_Marshal ¶
func (m *RulesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RulesResponse) XXX_Merge ¶
func (m *RulesResponse) XXX_Merge(src proto.Message)
func (*RulesResponse) XXX_Size ¶
func (m *RulesResponse) XXX_Size() int
func (*RulesResponse) XXX_Unmarshal ¶
func (m *RulesResponse) XXX_Unmarshal(b []byte) error
type Target ¶
type Target struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Type TargetType `protobuf:"varint,2,opt,name=type,proto3,enum=pb.TargetType" json:"type,omitempty"` Expr string `protobuf:"bytes,3,opt,name=expr,proto3" json:"expr,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Target) Descriptor ¶
func (*Target) GetType ¶
func (m *Target) GetType() TargetType
func (*Target) ProtoMessage ¶
func (*Target) ProtoMessage()
func (*Target) XXX_DiscardUnknown ¶
func (m *Target) XXX_DiscardUnknown()
func (*Target) XXX_Marshal ¶
func (*Target) XXX_Unmarshal ¶
type TargetType ¶
type TargetType int32
List of supported TargetType
const ( TargetType_ANY TargetType = 0 TargetType_TOPIC TargetType = 1 TargetType_CLIENT TargetType = 2 )
func (TargetType) EnumDescriptor ¶
func (TargetType) EnumDescriptor() ([]byte, []int)
func (TargetType) String ¶
func (x TargetType) String() string
type Trigger ¶
type Trigger struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Type TriggerType `protobuf:"varint,2,opt,name=type,proto3,enum=pb.TriggerType" json:"type,omitempty"` Settings []byte `protobuf:"bytes,3,opt,name=settings,proto3" json:"settings,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Trigger) Descriptor ¶
func (*Trigger) GetSettings ¶
func (*Trigger) GetType ¶
func (m *Trigger) GetType() TriggerType
func (*Trigger) MarshalJSON ¶
MarshalJSON is a custom json marshalling for Trigger type allowing to decode binary Settings and State to a proper json representation
func (*Trigger) ProtoMessage ¶
func (*Trigger) ProtoMessage()
func (*Trigger) XXX_DiscardUnknown ¶
func (m *Trigger) XXX_DiscardUnknown()
func (*Trigger) XXX_Marshal ¶
func (*Trigger) XXX_Unmarshal ¶
type TriggerSettings ¶
TriggerSettings defines a generic trigger settings structure
func Decode ¶
func Decode(t TriggerType, settings []byte) (TriggerSettings, error)
Decode will attempt to turn []byte settings into matching struct given the trigger type
type TriggerSettingsEvent ¶
type TriggerSettingsEvent struct { EventType EventType `json:"eventType,omitempty"` MaxOccurrence int `json:"maxOccurrence,omitempty"` }
TriggerSettingsEvent holds settings for event driven trigger types
func (*TriggerSettingsEvent) Decode ¶
func (t *TriggerSettingsEvent) Decode(b []byte) error
Decode json decode bytes to settings
func (*TriggerSettingsEvent) Encode ¶
func (t *TriggerSettingsEvent) Encode() ([]byte, error)
Encode json encode settings to []byte
func (*TriggerSettingsEvent) Validate ¶
func (t *TriggerSettingsEvent) Validate() error
Validate implements TriggerSettings and returns an error when the settings are invalid
type TriggerSettingsTimeInterval ¶
type TriggerSettingsTimeInterval struct {
Expr string `json:"expr,omitempty"`
}
TriggerSettingsTimeInterval holds settings for pb.TriggerType_TIME_INTERVAL trigger types
func (*TriggerSettingsTimeInterval) Decode ¶
func (t *TriggerSettingsTimeInterval) Decode(b []byte) error
Decode json decode bytes to settings
func (*TriggerSettingsTimeInterval) Encode ¶
func (t *TriggerSettingsTimeInterval) Encode() ([]byte, error)
Encode json encode settings to []byte
func (*TriggerSettingsTimeInterval) Validate ¶
func (t *TriggerSettingsTimeInterval) Validate() error
Validate implements TriggerSettings and returns an error when the settings are invalid
type TriggerType ¶
type TriggerType int32
List of supported TriggerType
const ( TriggerType_UNDEFINED_TRIGGER TriggerType = 0 TriggerType_TIME_INTERVAL TriggerType = 1 TriggerType_EVENT TriggerType = 2 )
func (TriggerType) EnumDescriptor ¶
func (TriggerType) EnumDescriptor() ([]byte, []int)
func (TriggerType) String ¶
func (x TriggerType) String() string
type UnimplementedC2AutomationEngineServer ¶
type UnimplementedC2AutomationEngineServer struct { }
UnimplementedC2AutomationEngineServer can be embedded to have forward compatible implementations.
func (*UnimplementedC2AutomationEngineServer) AddRule ¶
func (*UnimplementedC2AutomationEngineServer) AddRule(ctx context.Context, req *AddRuleRequest) (*RuleResponse, error)
func (*UnimplementedC2AutomationEngineServer) DeleteRule ¶
func (*UnimplementedC2AutomationEngineServer) DeleteRule(ctx context.Context, req *DeleteRuleRequest) (*DeleteRuleResponse, error)
func (*UnimplementedC2AutomationEngineServer) GetRule ¶
func (*UnimplementedC2AutomationEngineServer) GetRule(ctx context.Context, req *GetRuleRequest) (*RuleResponse, error)
func (*UnimplementedC2AutomationEngineServer) HealthCheck ¶
func (*UnimplementedC2AutomationEngineServer) HealthCheck(ctx context.Context, req *HealthCheckRequest) (*HealthCheckResponse, error)
func (*UnimplementedC2AutomationEngineServer) ListRules ¶
func (*UnimplementedC2AutomationEngineServer) ListRules(ctx context.Context, req *ListRulesRequest) (*RulesResponse, error)
func (*UnimplementedC2AutomationEngineServer) UpdateRule ¶
func (*UnimplementedC2AutomationEngineServer) UpdateRule(ctx context.Context, req *UpdateRuleRequest) (*RuleResponse, error)
type UpdateRuleRequest ¶
type UpdateRuleRequest struct { RuleId int32 `protobuf:"varint,1,opt,name=ruleId,proto3" json:"ruleId,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Action ActionType `protobuf:"varint,3,opt,name=action,proto3,enum=pb.ActionType" json:"action,omitempty"` Triggers []*Trigger `protobuf:"bytes,4,rep,name=triggers,proto3" json:"triggers,omitempty"` Targets []*Target `protobuf:"bytes,5,rep,name=targets,proto3" json:"targets,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
UpdateRuleRequest will fetch the rule identified by ruleId, and override its description, action, triggers and targets values with those provided.
func (*UpdateRuleRequest) Descriptor ¶
func (*UpdateRuleRequest) Descriptor() ([]byte, []int)
func (*UpdateRuleRequest) GetAction ¶
func (m *UpdateRuleRequest) GetAction() ActionType
func (*UpdateRuleRequest) GetDescription ¶
func (m *UpdateRuleRequest) GetDescription() string
func (*UpdateRuleRequest) GetRuleId ¶
func (m *UpdateRuleRequest) GetRuleId() int32
func (*UpdateRuleRequest) GetTargets ¶
func (m *UpdateRuleRequest) GetTargets() []*Target
func (*UpdateRuleRequest) GetTriggers ¶
func (m *UpdateRuleRequest) GetTriggers() []*Trigger
func (*UpdateRuleRequest) ProtoMessage ¶
func (*UpdateRuleRequest) ProtoMessage()
func (*UpdateRuleRequest) Reset ¶
func (m *UpdateRuleRequest) Reset()
func (*UpdateRuleRequest) String ¶
func (m *UpdateRuleRequest) String() string
func (*UpdateRuleRequest) XXX_DiscardUnknown ¶
func (m *UpdateRuleRequest) XXX_DiscardUnknown()
func (*UpdateRuleRequest) XXX_Marshal ¶
func (m *UpdateRuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdateRuleRequest) XXX_Merge ¶
func (m *UpdateRuleRequest) XXX_Merge(src proto.Message)
func (*UpdateRuleRequest) XXX_Size ¶
func (m *UpdateRuleRequest) XXX_Size() int
func (*UpdateRuleRequest) XXX_Unmarshal ¶
func (m *UpdateRuleRequest) XXX_Unmarshal(b []byte) error