v2

package
v2.0.0-beta.12 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package v2 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	HooksService_CreateHook_FullMethodName        = "/aruna.api.hooks.services.v2.HooksService/CreateHook"
	HooksService_AddProjectsToHook_FullMethodName = "/aruna.api.hooks.services.v2.HooksService/AddProjectsToHook"
	HooksService_ListProjectHooks_FullMethodName  = "/aruna.api.hooks.services.v2.HooksService/ListProjectHooks"
	HooksService_ListOwnedHooks_FullMethodName    = "/aruna.api.hooks.services.v2.HooksService/ListOwnedHooks"
	HooksService_DeleteHook_FullMethodName        = "/aruna.api.hooks.services.v2.HooksService/DeleteHook"
	HooksService_HookCallback_FullMethodName      = "/aruna.api.hooks.services.v2.HooksService/HookCallback"
)

Variables

View Source
var (
	TriggerType_name = map[int32]string{
		0: "TRIGGER_TYPE_UNSPECIFIED",
		1: "TRIGGER_TYPE_HOOK_ADDED",
		2: "TRIGGER_TYPE_RESOURCE_CREATED",
		3: "TRIGGER_TYPE_LABEL_ADDED",
		4: "TRIGGER_TYPE_STATIC_LABEL_ADDED",
		5: "TRIGGER_TYPE_HOOK_STATUS_CHANGED",
		6: "TRIGGER_TYPE_OBJECT_FINISHED",
	}
	TriggerType_value = map[string]int32{
		"TRIGGER_TYPE_UNSPECIFIED":         0,
		"TRIGGER_TYPE_HOOK_ADDED":          1,
		"TRIGGER_TYPE_RESOURCE_CREATED":    2,
		"TRIGGER_TYPE_LABEL_ADDED":         3,
		"TRIGGER_TYPE_STATIC_LABEL_ADDED":  4,
		"TRIGGER_TYPE_HOOK_STATUS_CHANGED": 5,
		"TRIGGER_TYPE_OBJECT_FINISHED":     6,
	}
)

Enum value maps for TriggerType.

View Source
var (
	Method_name = map[int32]string{
		0: "METHOD_UNSPECIFIED",
		1: "METHOD_PUT",
		2: "METHOD_POST",
	}
	Method_value = map[string]int32{
		"METHOD_UNSPECIFIED": 0,
		"METHOD_PUT":         1,
		"METHOD_POST":        2,
	}
)

Enum value maps for Method.

View Source
var File_aruna_api_hooks_services_v2_hooks_service_proto protoreflect.FileDescriptor
View Source
var HooksService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "aruna.api.hooks.services.v2.HooksService",
	HandlerType: (*HooksServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateHook",
			Handler:    _HooksService_CreateHook_Handler,
		},
		{
			MethodName: "AddProjectsToHook",
			Handler:    _HooksService_AddProjectsToHook_Handler,
		},
		{
			MethodName: "ListProjectHooks",
			Handler:    _HooksService_ListProjectHooks_Handler,
		},
		{
			MethodName: "ListOwnedHooks",
			Handler:    _HooksService_ListOwnedHooks_Handler,
		},
		{
			MethodName: "DeleteHook",
			Handler:    _HooksService_DeleteHook_Handler,
		},
		{
			MethodName: "HookCallback",
			Handler:    _HooksService_HookCallback_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "aruna/api/hooks/services/v2/hooks_service.proto",
}

HooksService_ServiceDesc is the grpc.ServiceDesc for HooksService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterHooksServiceHandler

func RegisterHooksServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterHooksServiceHandler registers the http handlers for service HooksService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterHooksServiceHandlerClient

func RegisterHooksServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HooksServiceClient) error

RegisterHooksServiceHandlerClient registers the http handlers for service HooksService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HooksServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HooksServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "HooksServiceClient" to call the correct interceptors.

func RegisterHooksServiceHandlerFromEndpoint

func RegisterHooksServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterHooksServiceHandlerFromEndpoint is same as RegisterHooksServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterHooksServiceHandlerServer

func RegisterHooksServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HooksServiceServer) error

RegisterHooksServiceHandlerServer registers the http handlers for service HooksService to "mux". UnaryRPC :call HooksServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHooksServiceHandlerFromEndpoint instead.

func RegisterHooksServiceServer

func RegisterHooksServiceServer(s grpc.ServiceRegistrar, srv HooksServiceServer)

Types

type AddHook

type AddHook struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*AddHook) Descriptor deprecated

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

Deprecated: Use AddHook.ProtoReflect.Descriptor instead.

func (*AddHook) GetKey

func (x *AddHook) GetKey() string

func (*AddHook) GetValue

func (x *AddHook) GetValue() string

func (*AddHook) ProtoMessage

func (*AddHook) ProtoMessage()

func (*AddHook) ProtoReflect

func (x *AddHook) ProtoReflect() protoreflect.Message

func (*AddHook) Reset

func (x *AddHook) Reset()

func (*AddHook) String

func (x *AddHook) String() string

type AddLabel

type AddLabel struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*AddLabel) Descriptor deprecated

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

Deprecated: Use AddLabel.ProtoReflect.Descriptor instead.

func (*AddLabel) GetKey

func (x *AddLabel) GetKey() string

func (*AddLabel) GetValue

func (x *AddLabel) GetValue() string

func (*AddLabel) ProtoMessage

func (*AddLabel) ProtoMessage()

func (*AddLabel) ProtoReflect

func (x *AddLabel) ProtoReflect() protoreflect.Message

func (*AddLabel) Reset

func (x *AddLabel) Reset()

func (*AddLabel) String

func (x *AddLabel) String() string

type AddProjectsToHookRequest

type AddProjectsToHookRequest struct {
	HookId     string   `protobuf:"bytes,1,opt,name=hook_id,json=hookId,proto3" json:"hook_id,omitempty"`
	ProjectIds []string `protobuf:"bytes,2,rep,name=project_ids,json=projectIds,proto3" json:"project_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*AddProjectsToHookRequest) Descriptor deprecated

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

Deprecated: Use AddProjectsToHookRequest.ProtoReflect.Descriptor instead.

func (*AddProjectsToHookRequest) GetHookId

func (x *AddProjectsToHookRequest) GetHookId() string

func (*AddProjectsToHookRequest) GetProjectIds

func (x *AddProjectsToHookRequest) GetProjectIds() []string

func (*AddProjectsToHookRequest) ProtoMessage

func (*AddProjectsToHookRequest) ProtoMessage()

func (*AddProjectsToHookRequest) ProtoReflect

func (x *AddProjectsToHookRequest) ProtoReflect() protoreflect.Message

func (*AddProjectsToHookRequest) Reset

func (x *AddProjectsToHookRequest) Reset()

func (*AddProjectsToHookRequest) String

func (x *AddProjectsToHookRequest) String() string

type AddProjectsToHookResponse

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

func (*AddProjectsToHookResponse) Descriptor deprecated

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

Deprecated: Use AddProjectsToHookResponse.ProtoReflect.Descriptor instead.

func (*AddProjectsToHookResponse) ProtoMessage

func (*AddProjectsToHookResponse) ProtoMessage()

func (*AddProjectsToHookResponse) ProtoReflect

func (*AddProjectsToHookResponse) Reset

func (x *AddProjectsToHookResponse) Reset()

func (*AddProjectsToHookResponse) String

func (x *AddProjectsToHookResponse) String() string

type CreateHookRequest

type CreateHookRequest struct {
	Name        string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Trigger     *Trigger `protobuf:"bytes,2,opt,name=trigger,proto3" json:"trigger,omitempty"`
	Hook        *Hook    `protobuf:"bytes,3,opt,name=hook,proto3" json:"hook,omitempty"`
	Timeout     uint64   `protobuf:"varint,4,opt,name=timeout,proto3" json:"timeout,omitempty"`
	ProjectIds  []string `protobuf:"bytes,5,rep,name=project_ids,json=projectIds,proto3" json:"project_ids,omitempty"`
	Description string   `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateHookRequest) Descriptor deprecated

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

Deprecated: Use CreateHookRequest.ProtoReflect.Descriptor instead.

func (*CreateHookRequest) GetDescription

func (x *CreateHookRequest) GetDescription() string

func (*CreateHookRequest) GetHook

func (x *CreateHookRequest) GetHook() *Hook

func (*CreateHookRequest) GetName

func (x *CreateHookRequest) GetName() string

func (*CreateHookRequest) GetProjectIds

func (x *CreateHookRequest) GetProjectIds() []string

func (*CreateHookRequest) GetTimeout

func (x *CreateHookRequest) GetTimeout() uint64

func (*CreateHookRequest) GetTrigger

func (x *CreateHookRequest) GetTrigger() *Trigger

func (*CreateHookRequest) ProtoMessage

func (*CreateHookRequest) ProtoMessage()

func (*CreateHookRequest) ProtoReflect

func (x *CreateHookRequest) ProtoReflect() protoreflect.Message

func (*CreateHookRequest) Reset

func (x *CreateHookRequest) Reset()

func (*CreateHookRequest) String

func (x *CreateHookRequest) String() string

type CreateHookResponse

type CreateHookResponse struct {
	HookId string `protobuf:"bytes,1,opt,name=hook_id,json=hookId,proto3" json:"hook_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateHookResponse) Descriptor deprecated

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

Deprecated: Use CreateHookResponse.ProtoReflect.Descriptor instead.

func (*CreateHookResponse) GetHookId

func (x *CreateHookResponse) GetHookId() string

func (*CreateHookResponse) ProtoMessage

func (*CreateHookResponse) ProtoMessage()

func (*CreateHookResponse) ProtoReflect

func (x *CreateHookResponse) ProtoReflect() protoreflect.Message

func (*CreateHookResponse) Reset

func (x *CreateHookResponse) Reset()

func (*CreateHookResponse) String

func (x *CreateHookResponse) String() string

type Credentials

type Credentials struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

Will be expanded with additional credential types

func (*Credentials) Descriptor deprecated

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

Deprecated: Use Credentials.ProtoReflect.Descriptor instead.

func (*Credentials) GetToken

func (x *Credentials) GetToken() string

func (*Credentials) ProtoMessage

func (*Credentials) ProtoMessage()

func (*Credentials) ProtoReflect

func (x *Credentials) ProtoReflect() protoreflect.Message

func (*Credentials) Reset

func (x *Credentials) Reset()

func (*Credentials) String

func (x *Credentials) String() string

type DeleteHookRequest

type DeleteHookRequest struct {
	HookId string `protobuf:"bytes,1,opt,name=hook_id,json=hookId,proto3" json:"hook_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteHookRequest) Descriptor deprecated

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

Deprecated: Use DeleteHookRequest.ProtoReflect.Descriptor instead.

func (*DeleteHookRequest) GetHookId

func (x *DeleteHookRequest) GetHookId() string

func (*DeleteHookRequest) ProtoMessage

func (*DeleteHookRequest) ProtoMessage()

func (*DeleteHookRequest) ProtoReflect

func (x *DeleteHookRequest) ProtoReflect() protoreflect.Message

func (*DeleteHookRequest) Reset

func (x *DeleteHookRequest) Reset()

func (*DeleteHookRequest) String

func (x *DeleteHookRequest) String() string

type DeleteHookResponse

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

func (*DeleteHookResponse) Descriptor deprecated

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

Deprecated: Use DeleteHookResponse.ProtoReflect.Descriptor instead.

func (*DeleteHookResponse) ProtoMessage

func (*DeleteHookResponse) ProtoMessage()

func (*DeleteHookResponse) ProtoReflect

func (x *DeleteHookResponse) ProtoReflect() protoreflect.Message

func (*DeleteHookResponse) Reset

func (x *DeleteHookResponse) Reset()

func (*DeleteHookResponse) String

func (x *DeleteHookResponse) String() string

type Error

type Error struct {
	Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetError

func (x *Error) GetError() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type ExternalHook

type ExternalHook struct {
	Url         string       `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	Credentials *Credentials `protobuf:"bytes,2,opt,name=credentials,proto3" json:"credentials,omitempty"`
	// If empty a basic JSON template will be used
	CustomTemplate *string `protobuf:"bytes,3,opt,name=custom_template,json=customTemplate,proto3,oneof" json:"custom_template,omitempty"`
	Method         Method  `protobuf:"varint,5,opt,name=method,proto3,enum=aruna.api.hooks.services.v2.Method" json:"method,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalHook) Descriptor deprecated

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

Deprecated: Use ExternalHook.ProtoReflect.Descriptor instead.

func (*ExternalHook) GetCredentials

func (x *ExternalHook) GetCredentials() *Credentials

func (*ExternalHook) GetCustomTemplate

func (x *ExternalHook) GetCustomTemplate() string

func (*ExternalHook) GetMethod

func (x *ExternalHook) GetMethod() Method

func (*ExternalHook) GetUrl

func (x *ExternalHook) GetUrl() string

func (*ExternalHook) ProtoMessage

func (*ExternalHook) ProtoMessage()

func (*ExternalHook) ProtoReflect

func (x *ExternalHook) ProtoReflect() protoreflect.Message

func (*ExternalHook) Reset

func (x *ExternalHook) Reset()

func (*ExternalHook) String

func (x *ExternalHook) String() string

type Filter

type Filter struct {

	// Types that are assignable to FilterVariant:
	//
	//	*Filter_Name
	//	*Filter_KeyValue
	FilterVariant isFilter_FilterVariant `protobuf_oneof:"filter_variant"`
	// contains filtered or unexported fields
}

func (*Filter) Descriptor deprecated

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

Deprecated: Use Filter.ProtoReflect.Descriptor instead.

func (*Filter) GetFilterVariant

func (m *Filter) GetFilterVariant() isFilter_FilterVariant

func (*Filter) GetKeyValue

func (x *Filter) GetKeyValue() *v2.KeyValue

func (*Filter) GetName

func (x *Filter) GetName() string

func (*Filter) ProtoMessage

func (*Filter) ProtoMessage()

func (*Filter) ProtoReflect

func (x *Filter) ProtoReflect() protoreflect.Message

func (*Filter) Reset

func (x *Filter) Reset()

func (*Filter) String

func (x *Filter) String() string

type Filter_KeyValue

type Filter_KeyValue struct {
	// Regex that matches key AND value
	KeyValue *v2.KeyValue `protobuf:"bytes,2,opt,name=key_value,json=keyValue,proto3,oneof"` // TODO: ObjectType & ObjectStatus
}

type Filter_Name

type Filter_Name struct {
	// Regex that matches name field
	Name string `protobuf:"bytes,1,opt,name=name,proto3,oneof"`
}

type Finished

type Finished struct {
	AddKeyValues    []*v2.KeyValue `protobuf:"bytes,1,rep,name=add_key_values,json=addKeyValues,proto3" json:"add_key_values,omitempty"`
	RemoveKeyValues []*v2.KeyValue `protobuf:"bytes,2,rep,name=remove_key_values,json=removeKeyValues,proto3" json:"remove_key_values,omitempty"`
	// contains filtered or unexported fields
}

func (*Finished) Descriptor deprecated

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

Deprecated: Use Finished.ProtoReflect.Descriptor instead.

func (*Finished) GetAddKeyValues

func (x *Finished) GetAddKeyValues() []*v2.KeyValue

func (*Finished) GetRemoveKeyValues

func (x *Finished) GetRemoveKeyValues() []*v2.KeyValue

func (*Finished) ProtoMessage

func (*Finished) ProtoMessage()

func (*Finished) ProtoReflect

func (x *Finished) ProtoReflect() protoreflect.Message

func (*Finished) Reset

func (x *Finished) Reset()

func (*Finished) String

func (x *Finished) String() string

type Hook

type Hook struct {

	// Types that are assignable to HookType:
	//
	//	*Hook_ExternalHook
	//	*Hook_InternalHook
	HookType isHook_HookType `protobuf_oneof:"hook_type"`
	// contains filtered or unexported fields
}

func (*Hook) Descriptor deprecated

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

Deprecated: Use Hook.ProtoReflect.Descriptor instead.

func (*Hook) GetExternalHook

func (x *Hook) GetExternalHook() *ExternalHook

func (*Hook) GetHookType

func (m *Hook) GetHookType() isHook_HookType

func (*Hook) GetInternalHook

func (x *Hook) GetInternalHook() *InternalHook

func (*Hook) ProtoMessage

func (*Hook) ProtoMessage()

func (*Hook) ProtoReflect

func (x *Hook) ProtoReflect() protoreflect.Message

func (*Hook) Reset

func (x *Hook) Reset()

func (*Hook) String

func (x *Hook) String() string

type HookCallbackRequest

type HookCallbackRequest struct {

	// Types that are assignable to Status:
	//
	//	*HookCallbackRequest_Finished
	//	*HookCallbackRequest_Error
	Status       isHookCallbackRequest_Status `protobuf_oneof:"status"`
	Secret       string                       `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"`
	HookId       string                       `protobuf:"bytes,4,opt,name=hook_id,json=hookId,proto3" json:"hook_id,omitempty"`
	ObjectId     string                       `protobuf:"bytes,5,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"`
	PubkeySerial int32                        `protobuf:"varint,6,opt,name=pubkey_serial,json=pubkeySerial,proto3" json:"pubkey_serial,omitempty"`
	// contains filtered or unexported fields
}

func (*HookCallbackRequest) Descriptor deprecated

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

Deprecated: Use HookCallbackRequest.ProtoReflect.Descriptor instead.

func (*HookCallbackRequest) GetError

func (x *HookCallbackRequest) GetError() *Error

func (*HookCallbackRequest) GetFinished

func (x *HookCallbackRequest) GetFinished() *Finished

func (*HookCallbackRequest) GetHookId

func (x *HookCallbackRequest) GetHookId() string

func (*HookCallbackRequest) GetObjectId

func (x *HookCallbackRequest) GetObjectId() string

func (*HookCallbackRequest) GetPubkeySerial

func (x *HookCallbackRequest) GetPubkeySerial() int32

func (*HookCallbackRequest) GetSecret

func (x *HookCallbackRequest) GetSecret() string

func (*HookCallbackRequest) GetStatus

func (m *HookCallbackRequest) GetStatus() isHookCallbackRequest_Status

func (*HookCallbackRequest) ProtoMessage

func (*HookCallbackRequest) ProtoMessage()

func (*HookCallbackRequest) ProtoReflect

func (x *HookCallbackRequest) ProtoReflect() protoreflect.Message

func (*HookCallbackRequest) Reset

func (x *HookCallbackRequest) Reset()

func (*HookCallbackRequest) String

func (x *HookCallbackRequest) String() string

type HookCallbackRequest_Error

type HookCallbackRequest_Error struct {
	Error *Error `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
}

type HookCallbackRequest_Finished

type HookCallbackRequest_Finished struct {
	Finished *Finished `protobuf:"bytes,1,opt,name=finished,proto3,oneof"`
}

type HookCallbackResponse

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

func (*HookCallbackResponse) Descriptor deprecated

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

Deprecated: Use HookCallbackResponse.ProtoReflect.Descriptor instead.

func (*HookCallbackResponse) ProtoMessage

func (*HookCallbackResponse) ProtoMessage()

func (*HookCallbackResponse) ProtoReflect

func (x *HookCallbackResponse) ProtoReflect() protoreflect.Message

func (*HookCallbackResponse) Reset

func (x *HookCallbackResponse) Reset()

func (*HookCallbackResponse) String

func (x *HookCallbackResponse) String() string

type HookInfo

type HookInfo struct {
	HookId      string   `protobuf:"bytes,1,opt,name=hook_id,json=hookId,proto3" json:"hook_id,omitempty"`
	ProjectIds  []string `protobuf:"bytes,2,rep,name=project_ids,json=projectIds,proto3" json:"project_ids,omitempty"`
	Name        string   `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Description string   `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	Hook        *Hook    `protobuf:"bytes,5,opt,name=hook,proto3" json:"hook,omitempty"`
	Trigger     *Trigger `protobuf:"bytes,6,opt,name=trigger,proto3" json:"trigger,omitempty"`
	Timeout     uint64   `protobuf:"varint,7,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*HookInfo) Descriptor deprecated

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

Deprecated: Use HookInfo.ProtoReflect.Descriptor instead.

func (*HookInfo) GetDescription

func (x *HookInfo) GetDescription() string

func (*HookInfo) GetHook

func (x *HookInfo) GetHook() *Hook

func (*HookInfo) GetHookId

func (x *HookInfo) GetHookId() string

func (*HookInfo) GetName

func (x *HookInfo) GetName() string

func (*HookInfo) GetProjectIds

func (x *HookInfo) GetProjectIds() []string

func (*HookInfo) GetTimeout

func (x *HookInfo) GetTimeout() uint64

func (*HookInfo) GetTrigger

func (x *HookInfo) GetTrigger() *Trigger

func (*HookInfo) ProtoMessage

func (*HookInfo) ProtoMessage()

func (*HookInfo) ProtoReflect

func (x *HookInfo) ProtoReflect() protoreflect.Message

func (*HookInfo) Reset

func (x *HookInfo) Reset()

func (*HookInfo) String

func (x *HookInfo) String() string

type Hook_ExternalHook

type Hook_ExternalHook struct {
	ExternalHook *ExternalHook `protobuf:"bytes,1,opt,name=external_hook,json=externalHook,proto3,oneof"`
}

type Hook_InternalHook

type Hook_InternalHook struct {
	InternalHook *InternalHook `protobuf:"bytes,2,opt,name=internal_hook,json=internalHook,proto3,oneof"`
}

type HooksServiceClient

type HooksServiceClient interface {
	// CreateHook
	//
	// Status: ALPHA
	//
	// Creates a replication request
	// Hooks are always associated with the owner that created the hook
	CreateHook(ctx context.Context, in *CreateHookRequest, opts ...grpc.CallOption) (*CreateHookResponse, error)
	// AddProjectsToHook
	//
	// Status: ALPHA
	//
	// Assigns a hook to a project
	AddProjectsToHook(ctx context.Context, in *AddProjectsToHookRequest, opts ...grpc.CallOption) (*AddProjectsToHookResponse, error)
	// ListProjectHooks
	//
	// Status: ALPHA
	//
	// List all hooks assigned to a project
	ListProjectHooks(ctx context.Context, in *ListProjectHooksRequest, opts ...grpc.CallOption) (*ListProjectHooksResponse, error)
	// ListOwnedHooks
	//
	// Status: ALPHA
	//
	// List all hooks created by a user
	ListOwnedHooks(ctx context.Context, in *ListOwnedHooksRequest, opts ...grpc.CallOption) (*ListOwnedHooksResponse, error)
	// DeleteHook
	//
	// Status: ALPHA
	//
	// Delete a hook by id
	DeleteHook(ctx context.Context, in *DeleteHookRequest, opts ...grpc.CallOption) (*DeleteHookResponse, error)
	// Callback API
	//
	// Status: ALPHA
	//
	// Externally triggered hooks should respond to this endpoint to
	// signal completion or failure and to provide additional flags for the object
	HookCallback(ctx context.Context, in *HookCallbackRequest, opts ...grpc.CallOption) (*HookCallbackResponse, error)
}

HooksServiceClient is the client API for HooksService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type HooksServiceServer

type HooksServiceServer interface {
	// CreateHook
	//
	// Status: ALPHA
	//
	// Creates a replication request
	// Hooks are always associated with the owner that created the hook
	CreateHook(context.Context, *CreateHookRequest) (*CreateHookResponse, error)
	// AddProjectsToHook
	//
	// Status: ALPHA
	//
	// Assigns a hook to a project
	AddProjectsToHook(context.Context, *AddProjectsToHookRequest) (*AddProjectsToHookResponse, error)
	// ListProjectHooks
	//
	// Status: ALPHA
	//
	// List all hooks assigned to a project
	ListProjectHooks(context.Context, *ListProjectHooksRequest) (*ListProjectHooksResponse, error)
	// ListOwnedHooks
	//
	// Status: ALPHA
	//
	// List all hooks created by a user
	ListOwnedHooks(context.Context, *ListOwnedHooksRequest) (*ListOwnedHooksResponse, error)
	// DeleteHook
	//
	// Status: ALPHA
	//
	// Delete a hook by id
	DeleteHook(context.Context, *DeleteHookRequest) (*DeleteHookResponse, error)
	// Callback API
	//
	// Status: ALPHA
	//
	// Externally triggered hooks should respond to this endpoint to
	// signal completion or failure and to provide additional flags for the object
	HookCallback(context.Context, *HookCallbackRequest) (*HookCallbackResponse, error)
}

HooksServiceServer is the server API for HooksService service. All implementations should embed UnimplementedHooksServiceServer for forward compatibility

type InternalHook

type InternalHook struct {

	// Types that are assignable to InternalAction:
	//
	//	*InternalHook_AddLabel
	//	*InternalHook_AddHook
	//	*InternalHook_AddRelation
	InternalAction isInternalHook_InternalAction `protobuf_oneof:"internal_action"`
	// contains filtered or unexported fields
}

func (*InternalHook) Descriptor deprecated

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

Deprecated: Use InternalHook.ProtoReflect.Descriptor instead.

func (*InternalHook) GetAddHook

func (x *InternalHook) GetAddHook() *AddHook

func (*InternalHook) GetAddLabel

func (x *InternalHook) GetAddLabel() *AddLabel

func (*InternalHook) GetAddRelation

func (x *InternalHook) GetAddRelation() *v2.Relation

func (*InternalHook) GetInternalAction

func (m *InternalHook) GetInternalAction() isInternalHook_InternalAction

func (*InternalHook) ProtoMessage

func (*InternalHook) ProtoMessage()

func (*InternalHook) ProtoReflect

func (x *InternalHook) ProtoReflect() protoreflect.Message

func (*InternalHook) Reset

func (x *InternalHook) Reset()

func (*InternalHook) String

func (x *InternalHook) String() string

type InternalHook_AddHook

type InternalHook_AddHook struct {
	AddHook *AddHook `protobuf:"bytes,2,opt,name=add_hook,json=addHook,proto3,oneof"`
}

type InternalHook_AddLabel

type InternalHook_AddLabel struct {
	AddLabel *AddLabel `protobuf:"bytes,1,opt,name=add_label,json=addLabel,proto3,oneof"`
}

type InternalHook_AddRelation

type InternalHook_AddRelation struct {
	AddRelation *v2.Relation `protobuf:"bytes,3,opt,name=add_relation,json=addRelation,proto3,oneof"`
}

type ListOwnedHooksRequest

type ListOwnedHooksRequest struct {

	// ADMIN only
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ListOwnedHooksRequest) Descriptor deprecated

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

Deprecated: Use ListOwnedHooksRequest.ProtoReflect.Descriptor instead.

func (*ListOwnedHooksRequest) GetUserId

func (x *ListOwnedHooksRequest) GetUserId() string

func (*ListOwnedHooksRequest) ProtoMessage

func (*ListOwnedHooksRequest) ProtoMessage()

func (*ListOwnedHooksRequest) ProtoReflect

func (x *ListOwnedHooksRequest) ProtoReflect() protoreflect.Message

func (*ListOwnedHooksRequest) Reset

func (x *ListOwnedHooksRequest) Reset()

func (*ListOwnedHooksRequest) String

func (x *ListOwnedHooksRequest) String() string

type ListOwnedHooksResponse

type ListOwnedHooksResponse struct {
	Infos []*HookInfo `protobuf:"bytes,1,rep,name=infos,proto3" json:"infos,omitempty"`
	// contains filtered or unexported fields
}

func (*ListOwnedHooksResponse) Descriptor deprecated

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

Deprecated: Use ListOwnedHooksResponse.ProtoReflect.Descriptor instead.

func (*ListOwnedHooksResponse) GetInfos

func (x *ListOwnedHooksResponse) GetInfos() []*HookInfo

func (*ListOwnedHooksResponse) ProtoMessage

func (*ListOwnedHooksResponse) ProtoMessage()

func (*ListOwnedHooksResponse) ProtoReflect

func (x *ListOwnedHooksResponse) ProtoReflect() protoreflect.Message

func (*ListOwnedHooksResponse) Reset

func (x *ListOwnedHooksResponse) Reset()

func (*ListOwnedHooksResponse) String

func (x *ListOwnedHooksResponse) String() string

type ListProjectHooksRequest

type ListProjectHooksRequest struct {
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ListProjectHooksRequest) Descriptor deprecated

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

Deprecated: Use ListProjectHooksRequest.ProtoReflect.Descriptor instead.

func (*ListProjectHooksRequest) GetProjectId

func (x *ListProjectHooksRequest) GetProjectId() string

func (*ListProjectHooksRequest) ProtoMessage

func (*ListProjectHooksRequest) ProtoMessage()

func (*ListProjectHooksRequest) ProtoReflect

func (x *ListProjectHooksRequest) ProtoReflect() protoreflect.Message

func (*ListProjectHooksRequest) Reset

func (x *ListProjectHooksRequest) Reset()

func (*ListProjectHooksRequest) String

func (x *ListProjectHooksRequest) String() string

type ListProjectHooksResponse

type ListProjectHooksResponse struct {
	Infos []*HookInfo `protobuf:"bytes,1,rep,name=infos,proto3" json:"infos,omitempty"`
	// contains filtered or unexported fields
}

func (*ListProjectHooksResponse) Descriptor deprecated

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

Deprecated: Use ListProjectHooksResponse.ProtoReflect.Descriptor instead.

func (*ListProjectHooksResponse) GetInfos

func (x *ListProjectHooksResponse) GetInfos() []*HookInfo

func (*ListProjectHooksResponse) ProtoMessage

func (*ListProjectHooksResponse) ProtoMessage()

func (*ListProjectHooksResponse) ProtoReflect

func (x *ListProjectHooksResponse) ProtoReflect() protoreflect.Message

func (*ListProjectHooksResponse) Reset

func (x *ListProjectHooksResponse) Reset()

func (*ListProjectHooksResponse) String

func (x *ListProjectHooksResponse) String() string

type Method

type Method int32
const (
	Method_METHOD_UNSPECIFIED Method = 0
	Method_METHOD_PUT         Method = 1
	Method_METHOD_POST        Method = 2
)

func (Method) Descriptor

func (Method) Descriptor() protoreflect.EnumDescriptor

func (Method) Enum

func (x Method) Enum() *Method

func (Method) EnumDescriptor deprecated

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

Deprecated: Use Method.Descriptor instead.

func (Method) Number

func (x Method) Number() protoreflect.EnumNumber

func (Method) String

func (x Method) String() string

func (Method) Type

func (Method) Type() protoreflect.EnumType

type Trigger

type Trigger struct {
	TriggerType TriggerType `` /* 140-byte string literal not displayed */
	Filters     []*Filter   `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"`
	// contains filtered or unexported fields
}

func (*Trigger) Descriptor deprecated

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

Deprecated: Use Trigger.ProtoReflect.Descriptor instead.

func (*Trigger) GetFilters

func (x *Trigger) GetFilters() []*Filter

func (*Trigger) GetTriggerType

func (x *Trigger) GetTriggerType() TriggerType

func (*Trigger) ProtoMessage

func (*Trigger) ProtoMessage()

func (*Trigger) ProtoReflect

func (x *Trigger) ProtoReflect() protoreflect.Message

func (*Trigger) Reset

func (x *Trigger) Reset()

func (*Trigger) String

func (x *Trigger) String() string

type TriggerType

type TriggerType int32
const (
	TriggerType_TRIGGER_TYPE_UNSPECIFIED         TriggerType = 0
	TriggerType_TRIGGER_TYPE_HOOK_ADDED          TriggerType = 1
	TriggerType_TRIGGER_TYPE_RESOURCE_CREATED    TriggerType = 2
	TriggerType_TRIGGER_TYPE_LABEL_ADDED         TriggerType = 3
	TriggerType_TRIGGER_TYPE_STATIC_LABEL_ADDED  TriggerType = 4
	TriggerType_TRIGGER_TYPE_HOOK_STATUS_CHANGED TriggerType = 5
	TriggerType_TRIGGER_TYPE_OBJECT_FINISHED     TriggerType = 6
)

func (TriggerType) Descriptor

func (TriggerType) Enum

func (x TriggerType) Enum() *TriggerType

func (TriggerType) EnumDescriptor deprecated

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

Deprecated: Use TriggerType.Descriptor instead.

func (TriggerType) Number

func (x TriggerType) Number() protoreflect.EnumNumber

func (TriggerType) String

func (x TriggerType) String() string

func (TriggerType) Type

type UnimplementedHooksServiceServer

type UnimplementedHooksServiceServer struct {
}

UnimplementedHooksServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedHooksServiceServer) AddProjectsToHook

func (UnimplementedHooksServiceServer) CreateHook

func (UnimplementedHooksServiceServer) DeleteHook

func (UnimplementedHooksServiceServer) HookCallback

func (UnimplementedHooksServiceServer) ListOwnedHooks

func (UnimplementedHooksServiceServer) ListProjectHooks

type UnsafeHooksServiceServer

type UnsafeHooksServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeHooksServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HooksServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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