Back to godoc.org

Package corredor

v0.0.0-...-9915ac2
Latest Go to latest

The latest major version is .

Published: Sep 13, 2020 | License: Apache-2.0 | Module: github.com/cortezaproject/corteza-server

Index

func GenericBundleHandler

func GenericBundleHandler(ctx context.Context, svc *service, bundleName, bundleType, ext string) (interface{}, error)

func GenericListHandler

func GenericListHandler(ctx context.Context, svc *service, f Filter, resourcePrefix string) (p *automationListSetPayload, err error)

GenericListHandler returns filtered list of scripts

func Healthcheck

func Healthcheck(ctx context.Context) error

Healtcheck for global

func NewConnection

func NewConnection(ctx context.Context, opt options.CorredorOpt, logger *zap.Logger) (c *grpc.ClientConn, err error)

Corredor standard connector to Corredor service via gRPC

func NewService

func NewService(logger *zap.Logger, opt options.CorredorOpt) *service

func RegisterClientScriptsServer

func RegisterClientScriptsServer(s *grpc.Server, srv ClientScriptsServer)

func RegisterServerScriptsServer

func RegisterServerScriptsServer(s *grpc.Server, srv ServerScriptsServer)

func RegisterStorageServer

func RegisterStorageServer(s *grpc.Server, srv StorageServer)

func Service

func Service() *service

func Setup

func Setup(logger *zap.Logger, opt options.CorredorOpt) (err error)

Setup start connects to Corredor & initialize service

type Bundle

type Bundle struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type                 string   `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Code                 string   `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Bundle) Descriptor

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

func (*Bundle) GetCode

func (m *Bundle) GetCode() string

func (*Bundle) GetName

func (m *Bundle) GetName() string

func (*Bundle) GetType

func (m *Bundle) GetType() string

func (*Bundle) ProtoMessage

func (*Bundle) ProtoMessage()

func (*Bundle) Reset

func (m *Bundle) Reset()

func (*Bundle) String

func (m *Bundle) String() string

func (*Bundle) XXX_DiscardUnknown

func (m *Bundle) XXX_DiscardUnknown()

func (*Bundle) XXX_Marshal

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

func (*Bundle) XXX_Merge

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

func (*Bundle) XXX_Size

func (m *Bundle) XXX_Size() int

func (*Bundle) XXX_Unmarshal

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

type BundleRequest

type BundleRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BundleRequest) Descriptor

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

func (*BundleRequest) GetName

func (m *BundleRequest) GetName() string

func (*BundleRequest) ProtoMessage

func (*BundleRequest) ProtoMessage()

func (*BundleRequest) Reset

func (m *BundleRequest) Reset()

func (*BundleRequest) String

func (m *BundleRequest) String() string

func (*BundleRequest) XXX_DiscardUnknown

func (m *BundleRequest) XXX_DiscardUnknown()

func (*BundleRequest) XXX_Marshal

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

func (*BundleRequest) XXX_Merge

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

func (*BundleRequest) XXX_Size

func (m *BundleRequest) XXX_Size() int

func (*BundleRequest) XXX_Unmarshal

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

type BundleResponse

type BundleResponse struct {
	Bundles              []*Bundle `protobuf:"bytes,1,rep,name=bundles,proto3" json:"bundles,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*BundleResponse) Descriptor

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

func (*BundleResponse) GetBundles

func (m *BundleResponse) GetBundles() []*Bundle

func (*BundleResponse) ProtoMessage

func (*BundleResponse) ProtoMessage()

func (*BundleResponse) Reset

func (m *BundleResponse) Reset()

func (*BundleResponse) String

func (m *BundleResponse) String() string

func (*BundleResponse) XXX_DiscardUnknown

func (m *BundleResponse) XXX_DiscardUnknown()

func (*BundleResponse) XXX_Marshal

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

func (*BundleResponse) XXX_Merge

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

func (*BundleResponse) XXX_Size

func (m *BundleResponse) XXX_Size() int

func (*BundleResponse) XXX_Unmarshal

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

type ClientScript

type ClientScript struct {
	Name                 string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Label                string     `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
	Description          string     `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Bundle               string     `protobuf:"bytes,4,opt,name=bundle,proto3" json:"bundle,omitempty"`
	Type                 string     `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"`
	UpdatedAt            string     `protobuf:"bytes,12,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
	Security             *Security  `protobuf:"bytes,13,opt,name=security,proto3" json:"security,omitempty"`
	Triggers             []*Trigger `protobuf:"bytes,14,rep,name=triggers,proto3" json:"triggers,omitempty"`
	Errors               []string   `protobuf:"bytes,15,rep,name=errors,proto3" json:"errors,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*ClientScript) Descriptor

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

func (*ClientScript) GetBundle

func (m *ClientScript) GetBundle() string

func (*ClientScript) GetDescription

func (m *ClientScript) GetDescription() string

func (*ClientScript) GetErrors

func (m *ClientScript) GetErrors() []string

func (*ClientScript) GetLabel

func (m *ClientScript) GetLabel() string

func (*ClientScript) GetName

func (m *ClientScript) GetName() string

func (*ClientScript) GetSecurity

func (m *ClientScript) GetSecurity() *Security

func (*ClientScript) GetTriggers

func (m *ClientScript) GetTriggers() []*Trigger

func (*ClientScript) GetType

func (m *ClientScript) GetType() string

func (*ClientScript) GetUpdatedAt

func (m *ClientScript) GetUpdatedAt() string

func (*ClientScript) ProtoMessage

func (*ClientScript) ProtoMessage()

func (*ClientScript) Reset

func (m *ClientScript) Reset()

func (*ClientScript) String

func (m *ClientScript) String() string

func (*ClientScript) XXX_DiscardUnknown

func (m *ClientScript) XXX_DiscardUnknown()

func (*ClientScript) XXX_Marshal

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

func (*ClientScript) XXX_Merge

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

func (*ClientScript) XXX_Size

func (m *ClientScript) XXX_Size() int

func (*ClientScript) XXX_Unmarshal

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

type ClientScriptListRequest

type ClientScriptListRequest struct {
	// query by name, label, description
	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// filter by resource - exact match
	ResourceType string `protobuf:"bytes,2,opt,name=resourceType,proto3" json:"resourceType,omitempty"`
	// filter by events - script must contain all specified events
	EventTypes []string `protobuf:"bytes,3,rep,name=eventTypes,proto3" json:"eventTypes,omitempty"`
	// filter by bundle - exact match
	Bundle               string   `protobuf:"bytes,4,opt,name=bundle,proto3" json:"bundle,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ClientScriptListRequest) Descriptor

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

func (*ClientScriptListRequest) GetBundle

func (m *ClientScriptListRequest) GetBundle() string

func (*ClientScriptListRequest) GetEventTypes

func (m *ClientScriptListRequest) GetEventTypes() []string

func (*ClientScriptListRequest) GetQuery

func (m *ClientScriptListRequest) GetQuery() string

func (*ClientScriptListRequest) GetResourceType

func (m *ClientScriptListRequest) GetResourceType() string

func (*ClientScriptListRequest) ProtoMessage

func (*ClientScriptListRequest) ProtoMessage()

func (*ClientScriptListRequest) Reset

func (m *ClientScriptListRequest) Reset()

func (*ClientScriptListRequest) String

func (m *ClientScriptListRequest) String() string

func (*ClientScriptListRequest) XXX_DiscardUnknown

func (m *ClientScriptListRequest) XXX_DiscardUnknown()

func (*ClientScriptListRequest) XXX_Marshal

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

func (*ClientScriptListRequest) XXX_Merge

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

func (*ClientScriptListRequest) XXX_Size

func (m *ClientScriptListRequest) XXX_Size() int

func (*ClientScriptListRequest) XXX_Unmarshal

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

type ClientScriptListResponse

type ClientScriptListResponse struct {
	Scripts              []*ClientScript `protobuf:"bytes,1,rep,name=scripts,proto3" json:"scripts,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*ClientScriptListResponse) Descriptor

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

func (*ClientScriptListResponse) GetScripts

func (m *ClientScriptListResponse) GetScripts() []*ClientScript

func (*ClientScriptListResponse) ProtoMessage

func (*ClientScriptListResponse) ProtoMessage()

func (*ClientScriptListResponse) Reset

func (m *ClientScriptListResponse) Reset()

func (*ClientScriptListResponse) String

func (m *ClientScriptListResponse) String() string

func (*ClientScriptListResponse) XXX_DiscardUnknown

func (m *ClientScriptListResponse) XXX_DiscardUnknown()

func (*ClientScriptListResponse) XXX_Marshal

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

func (*ClientScriptListResponse) XXX_Merge

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

func (*ClientScriptListResponse) XXX_Size

func (m *ClientScriptListResponse) XXX_Size() int

func (*ClientScriptListResponse) XXX_Unmarshal

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

type ClientScriptsClient

type ClientScriptsClient interface {
	// Bundles
	Bundle(ctx context.Context, in *BundleRequest, opts ...grpc.CallOption) (*BundleResponse, error)
	// List of client scripts
	List(ctx context.Context, in *ClientScriptListRequest, opts ...grpc.CallOption) (*ClientScriptListResponse, error)
}

ClientScriptsClient is the client API for ClientScripts service.

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

func NewClientScriptsClient

func NewClientScriptsClient(cc *grpc.ClientConn) ClientScriptsClient

type ClientScriptsServer

type ClientScriptsServer interface {
	// Bundles
	Bundle(context.Context, *BundleRequest) (*BundleResponse, error)
	// List of client scripts
	List(context.Context, *ClientScriptListRequest) (*ClientScriptListResponse, error)
}

ClientScriptsServer is the server API for ClientScripts service.

type ExecRequest

type ExecRequest struct {
	Name                 string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Args                 map[string]string "" /* 149 byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*ExecRequest) Descriptor

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

func (*ExecRequest) GetArgs

func (m *ExecRequest) GetArgs() map[string]string

func (*ExecRequest) GetName

func (m *ExecRequest) GetName() string

func (*ExecRequest) ProtoMessage

func (*ExecRequest) ProtoMessage()

func (*ExecRequest) Reset

func (m *ExecRequest) Reset()

func (*ExecRequest) String

func (m *ExecRequest) String() string

func (*ExecRequest) XXX_DiscardUnknown

func (m *ExecRequest) XXX_DiscardUnknown()

func (*ExecRequest) XXX_Marshal

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

func (*ExecRequest) XXX_Merge

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

func (*ExecRequest) XXX_Size

func (m *ExecRequest) XXX_Size() int

func (*ExecRequest) XXX_Unmarshal

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

type ExecResponse

type ExecResponse struct {
	Result               map[string]string "" /* 153 byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*ExecResponse) Descriptor

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

func (*ExecResponse) GetResult

func (m *ExecResponse) GetResult() map[string]string

func (*ExecResponse) ProtoMessage

func (*ExecResponse) ProtoMessage()

func (*ExecResponse) Reset

func (m *ExecResponse) Reset()

func (*ExecResponse) String

func (m *ExecResponse) String() string

func (*ExecResponse) XXX_DiscardUnknown

func (m *ExecResponse) XXX_DiscardUnknown()

func (*ExecResponse) XXX_Marshal

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

func (*ExecResponse) XXX_Merge

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

func (*ExecResponse) XXX_Size

func (m *ExecResponse) XXX_Size() int

func (*ExecResponse) XXX_Unmarshal

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

type Filter

type Filter struct {
	ResourceTypePrefixes []string `json:"resourceTypePrefixes"`
	ResourceTypes        []string `json:"resourceTypes"`
	EventTypes           []string `json:"eventTypes"`
	ExcludeServerScripts bool     `json:"excludeServerScripts"`
	ExcludeClientScripts bool     `json:"excludeClientScripts"`
	ExcludeInvalid       bool     `json:"excludeInvalid"`

	//Page    uint `json:"page"`
	//PerPage uint `json:"perPage"`
	Count uint `json:"count"`
}

type Iterator

type Iterator struct {
	EventType            string            `protobuf:"bytes,1,opt,name=eventType,proto3" json:"eventType,omitempty"`
	ResourceType         string            `protobuf:"bytes,2,opt,name=resourceType,proto3" json:"resourceType,omitempty"`
	Deferred             []string          `protobuf:"bytes,3,rep,name=deferred,proto3" json:"deferred,omitempty"`
	Filter               map[string]string "" /* 153 byte string literal not displayed */
	Action               string            `protobuf:"bytes,5,opt,name=action,proto3" json:"action,omitempty"`
	UiProps              []*TUIProp        `protobuf:"bytes,14,rep,name=uiProps,proto3" json:"uiProps,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Iterator) Descriptor

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

func (*Iterator) GetAction

func (m *Iterator) GetAction() string

func (*Iterator) GetDeferred

func (m *Iterator) GetDeferred() []string

func (*Iterator) GetEventType

func (m *Iterator) GetEventType() string

func (*Iterator) GetFilter

func (m *Iterator) GetFilter() map[string]string

func (*Iterator) GetResourceType

func (m *Iterator) GetResourceType() string

func (*Iterator) GetUiProps

func (m *Iterator) GetUiProps() []*TUIProp

func (*Iterator) ProtoMessage

func (*Iterator) ProtoMessage()

func (*Iterator) Reset

func (m *Iterator) Reset()

func (*Iterator) String

func (m *Iterator) String() string

func (*Iterator) XXX_DiscardUnknown

func (m *Iterator) XXX_DiscardUnknown()

func (*Iterator) XXX_Marshal

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

func (*Iterator) XXX_Merge

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

func (*Iterator) XXX_Size

func (m *Iterator) XXX_Size() int

func (*Iterator) XXX_Unmarshal

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

type IteratorResourceFinder

type IteratorResourceFinder func(ctx context.Context, f map[string]string, h eventbus.HandlerFn, action string) error

IteratorResourceFinder acts as a middleware that converts iteration request to appropriate resource iterator (eg: Record Finder)

type Script

type Script struct {
	Name        string          `json:"name"`
	Label       string          `json:"label"`
	Description string          `json:"description"`
	Errors      []string        `json:"errors,omitempty"`
	Triggers    []*Trigger      `json:"triggers"`
	Iterator    *Iterator       `json:"iterator"`
	Security    *ScriptSecurity `json:"security"`
	UpdatedAt   string          `json:"updatedAt,omitempty"`

	// If bundle or type is set, consider
	// this a frontend script
	Bundle string `json:"bundle,omitempty"`
	Type   string `json:"type,omitempty"`
}

type ScriptArgs

type ScriptArgs interface {
	eventbus.Event

	// Encode (event) to arguments passed to
	// event handlers ([automation ]script runner)
	Encode() (map[string][]byte, error)

	// Decodes received data back to event
	Decode(map[string][]byte) error
}

type ScriptSecurity

type ScriptSecurity struct {
	*Security
	// contains filtered or unexported fields
}

ScriptSecurity sets script security and run-as flag

Determinate user (if >0) that script will run under and allow/deny combination for roles that can see & execute explicit (onManual) scripts

Please note that implicit scripts cannot have RBAC protection! These scripts are always executed as configured no mather who runs them.

func (*ScriptSecurity) String

func (ss *ScriptSecurity) String() (o string)

String fn to make logging a bit friendlier

type ScriptSet

type ScriptSet []*Script

ScriptSet slice of Script

This type is auto-generated.

func (ScriptSet) Filter

func (set ScriptSet) Filter(f func(*Script) (bool, error)) (out ScriptSet, err error)

Filter iterates through every slice item, calls f(Script) (bool, err) and return filtered slice

This function is auto-generated.

func (ScriptSet) FindByName

func (set ScriptSet) FindByName(name string) *Script

FindByName returns script from the set if it exists

func (ScriptSet) Walk

func (set ScriptSet) Walk(w func(*Script) error) (err error)

Walk iterates through every slice item and calls w(Script) err

This function is auto-generated.

type Security

type Security struct {
	RunAs                string   `protobuf:"bytes,1,opt,name=runAs,proto3" json:"runAs,omitempty"`
	Deny                 []string `protobuf:"bytes,2,rep,name=deny,proto3" json:"deny,omitempty"`
	Allow                []string `protobuf:"bytes,3,rep,name=allow,proto3" json:"allow,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Security) Descriptor

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

func (*Security) GetAllow

func (m *Security) GetAllow() []string

func (*Security) GetDeny

func (m *Security) GetDeny() []string

func (*Security) GetRunAs

func (m *Security) GetRunAs() string

func (*Security) ProtoMessage

func (*Security) ProtoMessage()

func (*Security) Reset

func (m *Security) Reset()

func (*Security) String

func (m *Security) String() string

func (*Security) XXX_DiscardUnknown

func (m *Security) XXX_DiscardUnknown()

func (*Security) XXX_Marshal

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

func (*Security) XXX_Merge

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

func (*Security) XXX_Size

func (m *Security) XXX_Size() int

func (*Security) XXX_Unmarshal

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

type ServerScript

type ServerScript struct {
	Name                 string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Label                string     `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
	Description          string     `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	UpdatedAt            string     `protobuf:"bytes,12,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
	Security             *Security  `protobuf:"bytes,13,opt,name=security,proto3" json:"security,omitempty"`
	Triggers             []*Trigger `protobuf:"bytes,14,rep,name=triggers,proto3" json:"triggers,omitempty"`
	Iterator             *Iterator  `protobuf:"bytes,11,opt,name=iterator,proto3" json:"iterator,omitempty"`
	Errors               []string   `protobuf:"bytes,15,rep,name=errors,proto3" json:"errors,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*ServerScript) Descriptor

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

func (*ServerScript) GetDescription

func (m *ServerScript) GetDescription() string

func (*ServerScript) GetErrors

func (m *ServerScript) GetErrors() []string

func (*ServerScript) GetIterator

func (m *ServerScript) GetIterator() *Iterator

func (*ServerScript) GetLabel

func (m *ServerScript) GetLabel() string

func (*ServerScript) GetName

func (m *ServerScript) GetName() string

func (*ServerScript) GetSecurity

func (m *ServerScript) GetSecurity() *Security

func (*ServerScript) GetTriggers

func (m *ServerScript) GetTriggers() []*Trigger

func (*ServerScript) GetUpdatedAt

func (m *ServerScript) GetUpdatedAt() string

func (*ServerScript) ProtoMessage

func (*ServerScript) ProtoMessage()

func (*ServerScript) Reset

func (m *ServerScript) Reset()

func (*ServerScript) String

func (m *ServerScript) String() string

func (*ServerScript) XXX_DiscardUnknown

func (m *ServerScript) XXX_DiscardUnknown()

func (*ServerScript) XXX_Marshal

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

func (*ServerScript) XXX_Merge

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

func (*ServerScript) XXX_Size

func (m *ServerScript) XXX_Size() int

func (*ServerScript) XXX_Unmarshal

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

type ServerScriptListRequest

type ServerScriptListRequest struct {
	// query by name, label, description
	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// filter by resource - exact match
	ResourceType string `protobuf:"bytes,2,opt,name=resourceType,proto3" json:"resourceType,omitempty"`
	// filter by events - script must contain all specified events
	EventTypes           []string `protobuf:"bytes,3,rep,name=eventTypes,proto3" json:"eventTypes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServerScriptListRequest) Descriptor

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

func (*ServerScriptListRequest) GetEventTypes

func (m *ServerScriptListRequest) GetEventTypes() []string

func (*ServerScriptListRequest) GetQuery

func (m *ServerScriptListRequest) GetQuery() string

func (*ServerScriptListRequest) GetResourceType

func (m *ServerScriptListRequest) GetResourceType() string

func (*ServerScriptListRequest) ProtoMessage

func (*ServerScriptListRequest) ProtoMessage()

func (*ServerScriptListRequest) Reset

func (m *ServerScriptListRequest) Reset()

func (*ServerScriptListRequest) String

func (m *ServerScriptListRequest) String() string

func (*ServerScriptListRequest) XXX_DiscardUnknown

func (m *ServerScriptListRequest) XXX_DiscardUnknown()

func (*ServerScriptListRequest) XXX_Marshal

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

func (*ServerScriptListRequest) XXX_Merge

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

func (*ServerScriptListRequest) XXX_Size

func (m *ServerScriptListRequest) XXX_Size() int

func (*ServerScriptListRequest) XXX_Unmarshal

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

type ServerScriptListResponse

type ServerScriptListResponse struct {
	Scripts              []*ServerScript `protobuf:"bytes,1,rep,name=scripts,proto3" json:"scripts,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*ServerScriptListResponse) Descriptor

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

func (*ServerScriptListResponse) GetScripts

func (m *ServerScriptListResponse) GetScripts() []*ServerScript

func (*ServerScriptListResponse) ProtoMessage

func (*ServerScriptListResponse) ProtoMessage()

func (*ServerScriptListResponse) Reset

func (m *ServerScriptListResponse) Reset()

func (*ServerScriptListResponse) String

func (m *ServerScriptListResponse) String() string

func (*ServerScriptListResponse) XXX_DiscardUnknown

func (m *ServerScriptListResponse) XXX_DiscardUnknown()

func (*ServerScriptListResponse) XXX_Marshal

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

func (*ServerScriptListResponse) XXX_Merge

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

func (*ServerScriptListResponse) XXX_Size

func (m *ServerScriptListResponse) XXX_Size() int

func (*ServerScriptListResponse) XXX_Unmarshal

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

type ServerScriptsClient

type ServerScriptsClient interface {
	// Executes server script
	Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error)
	// List of server scripts
	List(ctx context.Context, in *ServerScriptListRequest, opts ...grpc.CallOption) (*ServerScriptListResponse, error)
}

ServerScriptsClient is the client API for ServerScripts service.

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

func NewServerScriptsClient

func NewServerScriptsClient(cc *grpc.ClientConn) ServerScriptsClient

type ServerScriptsServer

type ServerScriptsServer interface {
	// Executes server script
	Exec(context.Context, *ExecRequest) (*ExecResponse, error)
	// List of server scripts
	List(context.Context, *ServerScriptListRequest) (*ServerScriptListResponse, error)
}

ServerScriptsServer is the server API for ServerScripts service.

type StorageClient

type StorageClient interface {
}

StorageClient is the client API for Storage service.

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

func NewStorageClient

func NewStorageClient(cc *grpc.ClientConn) StorageClient

type StorageServer

type StorageServer interface {
}

StorageServer is the server API for Storage service.

type TConstraint

type TConstraint struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Op                   string   `protobuf:"bytes,2,opt,name=op,proto3" json:"op,omitempty"`
	Value                []string `protobuf:"bytes,3,rep,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TConstraint) Descriptor

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

func (*TConstraint) GetName

func (m *TConstraint) GetName() string

func (*TConstraint) GetOp

func (m *TConstraint) GetOp() string

func (*TConstraint) GetValue

func (m *TConstraint) GetValue() []string

func (*TConstraint) ProtoMessage

func (*TConstraint) ProtoMessage()

func (*TConstraint) Reset

func (m *TConstraint) Reset()

func (*TConstraint) String

func (m *TConstraint) String() string

func (*TConstraint) XXX_DiscardUnknown

func (m *TConstraint) XXX_DiscardUnknown()

func (*TConstraint) XXX_Marshal

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

func (*TConstraint) XXX_Merge

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

func (*TConstraint) XXX_Size

func (m *TConstraint) XXX_Size() int

func (*TConstraint) XXX_Unmarshal

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

type TUIProp

type TUIProp struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TUIProp) Descriptor

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

func (*TUIProp) GetName

func (m *TUIProp) GetName() string

func (*TUIProp) GetValue

func (m *TUIProp) GetValue() string

func (*TUIProp) ProtoMessage

func (*TUIProp) ProtoMessage()

func (*TUIProp) Reset

func (m *TUIProp) Reset()

func (*TUIProp) String

func (m *TUIProp) String() string

func (*TUIProp) XXX_DiscardUnknown

func (m *TUIProp) XXX_DiscardUnknown()

func (*TUIProp) XXX_Marshal

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

func (*TUIProp) XXX_Merge

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

func (*TUIProp) XXX_Size

func (m *TUIProp) XXX_Size() int

func (*TUIProp) XXX_Unmarshal

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

type Trigger

type Trigger struct {
	EventTypes           []string       `protobuf:"bytes,1,rep,name=eventTypes,proto3" json:"eventTypes,omitempty"`
	ResourceTypes        []string       `protobuf:"bytes,2,rep,name=resourceTypes,proto3" json:"resourceTypes,omitempty"`
	UiProps              []*TUIProp     `protobuf:"bytes,14,rep,name=uiProps,proto3" json:"uiProps,omitempty"`
	Constraints          []*TConstraint `protobuf:"bytes,15,rep,name=constraints,proto3" json:"constraints,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*Trigger) Descriptor

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

func (*Trigger) GetConstraints

func (m *Trigger) GetConstraints() []*TConstraint

func (*Trigger) GetEventTypes

func (m *Trigger) GetEventTypes() []string

func (*Trigger) GetResourceTypes

func (m *Trigger) GetResourceTypes() []string

func (*Trigger) GetUiProps

func (m *Trigger) GetUiProps() []*TUIProp

func (*Trigger) ProtoMessage

func (*Trigger) ProtoMessage()

func (*Trigger) Reset

func (m *Trigger) Reset()

func (*Trigger) String

func (m *Trigger) String() string

func (*Trigger) XXX_DiscardUnknown

func (m *Trigger) XXX_DiscardUnknown()

func (*Trigger) XXX_Marshal

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

func (*Trigger) XXX_Merge

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

func (*Trigger) XXX_Size

func (m *Trigger) XXX_Size() int

func (*Trigger) XXX_Unmarshal

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

type UnimplementedClientScriptsServer

type UnimplementedClientScriptsServer struct {
}

UnimplementedClientScriptsServer can be embedded to have forward compatible implementations.

func (*UnimplementedClientScriptsServer) Bundle

func (*UnimplementedClientScriptsServer) Bundle(ctx context.Context, req *BundleRequest) (*BundleResponse, error)

func (*UnimplementedClientScriptsServer) List

func (*UnimplementedClientScriptsServer) List(ctx context.Context, req *ClientScriptListRequest) (*ClientScriptListResponse, error)

type UnimplementedServerScriptsServer

type UnimplementedServerScriptsServer struct {
}

UnimplementedServerScriptsServer can be embedded to have forward compatible implementations.

func (*UnimplementedServerScriptsServer) Exec

func (*UnimplementedServerScriptsServer) Exec(ctx context.Context, req *ExecRequest) (*ExecResponse, error)

func (*UnimplementedServerScriptsServer) List

func (*UnimplementedServerScriptsServer) List(ctx context.Context, req *ServerScriptListRequest) (*ServerScriptListResponse, error)

type UnimplementedStorageServer

type UnimplementedStorageServer struct {
}

UnimplementedStorageServer can be embedded to have forward compatible implementations.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier