service

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package service is a generated protocol buffer package.

It is generated from these files:

common.proto

It has these top-level messages:

Query
ResourcePolicyQuery
ResourcePolicy
ActionOutputQuery
SourceSingleQuery
StopEvent
StatusResponse
ChangesArchiveQuery

Package service provides protobuf "any" types used by other proto's

Index

Constants

This section is empty.

Variables

View Source
var OperationType_name = map[int32]string{
	0: "OR",
	1: "AND",
}
View Source
var OperationType_value = map[string]int32{
	"OR":  0,
	"AND": 1,
}
View Source
var ResourcePolicyAction_name = map[int32]string{
	0: "ANY",
	1: "OWNER",
	2: "READ",
	3: "WRITE",
	4: "EDIT_RULES",
}
View Source
var ResourcePolicyAction_value = map[string]int32{
	"ANY":        0,
	"OWNER":      1,
	"READ":       2,
	"WRITE":      3,
	"EDIT_RULES": 4,
}
View Source
var ResourcePolicy_PolicyEffect_name = map[int32]string{
	0: "deny",
	1: "allow",
}
View Source
var ResourcePolicy_PolicyEffect_value = map[string]int32{
	"deny":  0,
	"allow": 1,
}

Functions

func RegisterArchiverHandler added in v1.0.2

func RegisterArchiverHandler(s server.Server, hdlr ArchiverHandler, opts ...server.HandlerOption)

func RegisterServiceHandler

func RegisterServiceHandler(s server.Server, hdlr ServiceHandler, opts ...server.HandlerOption)

func RegisterStarterHandler

func RegisterStarterHandler(s server.Server, hdlr StarterHandler, opts ...server.HandlerOption)

Types

type ActionOutputQuery

type ActionOutputQuery struct {
	// Check if ActionOutput has Success = true
	Success bool `protobuf:"varint,1,opt,name=Success" json:"Success,omitempty"`
	// Check if ActionOutput has Success = false
	Failed bool `protobuf:"varint,2,opt,name=Failed" json:"Failed,omitempty"`
	// Find occurence of string in body
	StringBodyCompare string `protobuf:"bytes,3,opt,name=StringBodyCompare" json:"StringBodyCompare,omitempty"`
	// Find similar Json
	JsonBodyCompare string `protobuf:"bytes,4,opt,name=JsonBodyCompare" json:"JsonBodyCompare,omitempty"`
	// Find occurence of string in error
	ErrorStringCompare string `protobuf:"bytes,5,opt,name=ErrorStringCompare" json:"ErrorStringCompare,omitempty"`
	// Invert condition
	Not bool `protobuf:"varint,6,opt,name=Not" json:"Not,omitempty"`
}

func (*ActionOutputQuery) Descriptor

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

func (*ActionOutputQuery) GetErrorStringCompare

func (m *ActionOutputQuery) GetErrorStringCompare() string

func (*ActionOutputQuery) GetFailed

func (m *ActionOutputQuery) GetFailed() bool

func (*ActionOutputQuery) GetJsonBodyCompare

func (m *ActionOutputQuery) GetJsonBodyCompare() string

func (*ActionOutputQuery) GetNot

func (m *ActionOutputQuery) GetNot() bool

func (*ActionOutputQuery) GetStringBodyCompare

func (m *ActionOutputQuery) GetStringBodyCompare() string

func (*ActionOutputQuery) GetSuccess

func (m *ActionOutputQuery) GetSuccess() bool

func (*ActionOutputQuery) ProtoMessage

func (*ActionOutputQuery) ProtoMessage()

func (*ActionOutputQuery) Reset

func (m *ActionOutputQuery) Reset()

func (*ActionOutputQuery) String

func (m *ActionOutputQuery) String() string

type Archiver added in v1.0.2

type Archiver struct {
	ArchiverHandler
}

func (*Archiver) Archive added in v1.0.2

func (h *Archiver) Archive(ctx context.Context, in *Query, out *StatusResponse) error

type ArchiverClient added in v1.0.2

type ArchiverClient interface {
	Archive(ctx context.Context, in *Query, opts ...client.CallOption) (*StatusResponse, error)
}

func NewArchiverClient added in v1.0.2

func NewArchiverClient(serviceName string, c client.Client) ArchiverClient

type ArchiverHandler added in v1.0.2

type ArchiverHandler interface {
	Archive(context.Context, *Query, *StatusResponse) error
}

type ChangesArchiveQuery added in v1.0.2

type ChangesArchiveQuery struct {
	RemainingRows uint64 `protobuf:"varint,1,opt,name=RemainingRows" json:"RemainingRows,omitempty"`
}

TODO - move from there

func (*ChangesArchiveQuery) Descriptor added in v1.0.2

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

func (*ChangesArchiveQuery) GetRemainingRows added in v1.0.2

func (m *ChangesArchiveQuery) GetRemainingRows() uint64

func (*ChangesArchiveQuery) ProtoMessage added in v1.0.2

func (*ChangesArchiveQuery) ProtoMessage()

func (*ChangesArchiveQuery) Reset added in v1.0.2

func (m *ChangesArchiveQuery) Reset()

func (*ChangesArchiveQuery) String added in v1.0.2

func (m *ChangesArchiveQuery) String() string

type ConcreteQuery

type ConcreteQuery struct {
	Name string      `json:"Name,omitempty"`
	Data interface{} `json:"Data,omitempty"`
}

type OperationType

type OperationType int32
const (
	OperationType_OR  OperationType = 0
	OperationType_AND OperationType = 1
)

func (OperationType) EnumDescriptor

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

func (OperationType) String

func (x OperationType) String() string

type Query

type Query struct {
	SubQueries          []*google_protobuf.Any `protobuf:"bytes,1,rep,name=SubQueries" json:"SubQueries,omitempty"`
	Operation           OperationType          `protobuf:"varint,2,opt,name=Operation,enum=service.OperationType" json:"Operation,omitempty"`
	ResourcePolicyQuery *ResourcePolicyQuery   `protobuf:"bytes,3,opt,name=ResourcePolicyQuery" json:"ResourcePolicyQuery,omitempty"`
	Offset              int64                  `protobuf:"varint,4,opt,name=Offset" json:"Offset,omitempty"`
	Limit               int64                  `protobuf:"varint,5,opt,name=Limit" json:"Limit,omitempty"`
	GroupBy             int32                  `protobuf:"varint,6,opt,name=groupBy" json:"groupBy,omitempty"`
}

func (*Query) Descriptor

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

func (*Query) GetGroupBy

func (m *Query) GetGroupBy() int32

func (*Query) GetLimit

func (m *Query) GetLimit() int64

func (*Query) GetOffset

func (m *Query) GetOffset() int64

func (*Query) GetOperation

func (m *Query) GetOperation() OperationType

func (*Query) GetResourcePolicyQuery

func (m *Query) GetResourcePolicyQuery() *ResourcePolicyQuery

func (*Query) GetSubQueries

func (m *Query) GetSubQueries() []*google_protobuf.Any

func (*Query) MarshalJSONPB

func (q *Query) MarshalJSONPB(marshaler *jsonpb.Marshaler) ([]byte, error)

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) Reset

func (m *Query) Reset()

func (*Query) String

func (m *Query) String() string

func (*Query) UnmarshalJSONPB

func (q *Query) UnmarshalJSONPB(unmarshaller *jsonpb.Unmarshaler, data []byte) error

type ResourcePoliciesBuilder

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

Helper for building ResourcePolicies lists

func NewResourcePoliciesBuilder

func NewResourcePoliciesBuilder() *ResourcePoliciesBuilder

func (*ResourcePoliciesBuilder) Policies

func (r *ResourcePoliciesBuilder) Policies() []*ResourcePolicy

func (*ResourcePoliciesBuilder) Reset

func (*ResourcePoliciesBuilder) WithOwner

func (r *ResourcePoliciesBuilder) WithOwner(userUuid string) *ResourcePoliciesBuilder

func (*ResourcePoliciesBuilder) WithProfileRead

func (r *ResourcePoliciesBuilder) WithProfileRead(profile string) *ResourcePoliciesBuilder

func (*ResourcePoliciesBuilder) WithProfileWrite

func (r *ResourcePoliciesBuilder) WithProfileWrite(profile string) *ResourcePoliciesBuilder

func (*ResourcePoliciesBuilder) WithResourcePolicy

func (r *ResourcePoliciesBuilder) WithResourcePolicy(policy *ResourcePolicy) *ResourcePoliciesBuilder

func (*ResourcePoliciesBuilder) WithStandardUserPolicies

func (r *ResourcePoliciesBuilder) WithStandardUserPolicies(userLogin string) *ResourcePoliciesBuilder

func (*ResourcePoliciesBuilder) WithUserRead

func (r *ResourcePoliciesBuilder) WithUserRead(login string) *ResourcePoliciesBuilder

func (*ResourcePoliciesBuilder) WithUserWrite

func (r *ResourcePoliciesBuilder) WithUserWrite(login string) *ResourcePoliciesBuilder

type ResourcePolicy

type ResourcePolicy struct {
	Id             int64                       `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Resource       string                      `protobuf:"bytes,2,opt,name=Resource" json:"Resource,omitempty"`
	Action         ResourcePolicyAction        `protobuf:"varint,3,opt,name=Action,enum=service.ResourcePolicyAction" json:"Action,omitempty"`
	Subject        string                      `protobuf:"bytes,4,opt,name=Subject" json:"Subject,omitempty"`
	Effect         ResourcePolicy_PolicyEffect `protobuf:"varint,5,opt,name=Effect,enum=service.ResourcePolicy_PolicyEffect" json:"Effect,omitempty"`
	JsonConditions string                      `protobuf:"bytes,6,opt,name=JsonConditions" json:"JsonConditions,omitempty"`
}

func (*ResourcePolicy) Descriptor

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

func (*ResourcePolicy) GetAction

func (m *ResourcePolicy) GetAction() ResourcePolicyAction

func (*ResourcePolicy) GetEffect

func (*ResourcePolicy) GetId

func (m *ResourcePolicy) GetId() int64

func (*ResourcePolicy) GetJsonConditions

func (m *ResourcePolicy) GetJsonConditions() string

func (*ResourcePolicy) GetResource

func (m *ResourcePolicy) GetResource() string

func (*ResourcePolicy) GetSubject

func (m *ResourcePolicy) GetSubject() string

func (*ResourcePolicy) ProtoMessage

func (*ResourcePolicy) ProtoMessage()

func (*ResourcePolicy) Reset

func (m *ResourcePolicy) Reset()

func (*ResourcePolicy) String

func (m *ResourcePolicy) String() string

type ResourcePolicyAction

type ResourcePolicyAction int32
const (
	ResourcePolicyAction_ANY        ResourcePolicyAction = 0
	ResourcePolicyAction_OWNER      ResourcePolicyAction = 1
	ResourcePolicyAction_READ       ResourcePolicyAction = 2
	ResourcePolicyAction_WRITE      ResourcePolicyAction = 3
	ResourcePolicyAction_EDIT_RULES ResourcePolicyAction = 4
)

func (ResourcePolicyAction) EnumDescriptor

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

func (ResourcePolicyAction) String

func (x ResourcePolicyAction) String() string

type ResourcePolicyQuery

type ResourcePolicyQuery struct {
	Subjects []string `protobuf:"bytes,1,rep,name=Subjects" json:"Subjects,omitempty"`
	Empty    bool     `protobuf:"varint,2,opt,name=Empty" json:"Empty,omitempty"`
	Any      bool     `protobuf:"varint,3,opt,name=Any" json:"Any,omitempty"`
}

func (*ResourcePolicyQuery) Descriptor

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

func (*ResourcePolicyQuery) GetAny

func (m *ResourcePolicyQuery) GetAny() bool

func (*ResourcePolicyQuery) GetEmpty

func (m *ResourcePolicyQuery) GetEmpty() bool

func (*ResourcePolicyQuery) GetSubjects

func (m *ResourcePolicyQuery) GetSubjects() []string

func (*ResourcePolicyQuery) ProtoMessage

func (*ResourcePolicyQuery) ProtoMessage()

func (*ResourcePolicyQuery) Reset

func (m *ResourcePolicyQuery) Reset()

func (*ResourcePolicyQuery) String

func (m *ResourcePolicyQuery) String() string

type ResourcePolicy_PolicyEffect

type ResourcePolicy_PolicyEffect int32
const (
	ResourcePolicy_deny  ResourcePolicy_PolicyEffect = 0
	ResourcePolicy_allow ResourcePolicy_PolicyEffect = 1
)

func (ResourcePolicy_PolicyEffect) EnumDescriptor

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

func (ResourcePolicy_PolicyEffect) String

type Service

type Service struct {
	ServiceHandler
}

func (*Service) Status

func (h *Service) Status(ctx context.Context, in *google_protobuf1.Empty, out *StatusResponse) error

type ServiceClient

type ServiceClient interface {
	Status(ctx context.Context, in *google_protobuf1.Empty, opts ...client.CallOption) (*StatusResponse, error)
}

func NewServiceClient

func NewServiceClient(serviceName string, c client.Client) ServiceClient

type ServiceHandler

type ServiceHandler interface {
	Status(context.Context, *google_protobuf1.Empty, *StatusResponse) error
}

type SourceSingleQuery

type SourceSingleQuery struct {
	// Regexp to filter context by IP
	IPMask string `protobuf:"bytes,2,opt,name=IPMask" json:"IPMask,omitempty"`
	// Regexp to filter for a given user-agent
	UserAgent string `protobuf:"bytes,3,opt,name=UserAgent" json:"UserAgent,omitempty"`
	// Limit to a given workspaceId
	WorkspaceId string `protobuf:"bytes,4,opt,name=WorkspaceId" json:"WorkspaceId,omitempty"`
	// Invert condition
	Not bool `protobuf:"varint,5,opt,name=Not" json:"Not,omitempty"`
}

func (*SourceSingleQuery) Descriptor

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

func (*SourceSingleQuery) GetIPMask

func (m *SourceSingleQuery) GetIPMask() string

func (*SourceSingleQuery) GetNot

func (m *SourceSingleQuery) GetNot() bool

func (*SourceSingleQuery) GetUserAgent

func (m *SourceSingleQuery) GetUserAgent() string

func (*SourceSingleQuery) GetWorkspaceId

func (m *SourceSingleQuery) GetWorkspaceId() string

func (*SourceSingleQuery) ProtoMessage

func (*SourceSingleQuery) ProtoMessage()

func (*SourceSingleQuery) Reset

func (m *SourceSingleQuery) Reset()

func (*SourceSingleQuery) String

func (m *SourceSingleQuery) String() string

type Starter

type Starter struct {
	StarterHandler
}

func (*Starter) Start

type StarterClient

type StarterClient interface {
	Start(ctx context.Context, in *google_protobuf1.Empty, opts ...client.CallOption) (*google_protobuf1.Empty, error)
}

func NewStarterClient

func NewStarterClient(serviceName string, c client.Client) StarterClient

type StarterHandler

type StarterHandler interface {
	Start(context.Context, *google_protobuf1.Empty, *google_protobuf1.Empty) error
}

type StatusResponse

type StatusResponse struct {
	OK bool `protobuf:"varint,1,opt,name=OK" json:"OK,omitempty"`
}

func (*StatusResponse) Descriptor

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

func (*StatusResponse) GetOK

func (m *StatusResponse) GetOK() bool

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) Reset

func (m *StatusResponse) Reset()

func (*StatusResponse) String

func (m *StatusResponse) String() string

type StopEvent

type StopEvent struct {
	ServiceName string `protobuf:"bytes,1,opt,name=ServiceName" json:"ServiceName,omitempty"`
}

func (*StopEvent) Descriptor

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

func (*StopEvent) GetServiceName

func (m *StopEvent) GetServiceName() string

func (*StopEvent) ProtoMessage

func (*StopEvent) ProtoMessage()

func (*StopEvent) Reset

func (m *StopEvent) Reset()

func (*StopEvent) String

func (m *StopEvent) String() string

Jump to

Keyboard shortcuts

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