hooks

package
v2.30.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 12 Imported by: 12

Documentation

Index

Constants

View Source
const (
	HooksPlugin_Init_FullMethodName      = "/HooksPlugin/Init"
	HooksPlugin_Name_FullMethodName      = "/HooksPlugin/Name"
	HooksPlugin_Version_FullMethodName   = "/HooksPlugin/Version"
	HooksPlugin_Success_FullMethodName   = "/HooksPlugin/Success"
	HooksPlugin_NoRelease_FullMethodName = "/HooksPlugin/NoRelease"
)
View Source
const PluginName = "hooks"

Variables

View Source
var (
	NoReleaseReason_name = map[int32]string{
		0: "CONDITION",
		1: "NO_CHANGE",
	}
	NoReleaseReason_value = map[string]int32{
		"CONDITION": 0,
		"NO_CHANGE": 1,
	}
)

Enum value maps for NoReleaseReason.

View Source
var File_pkg_hooks_hooks_proto protoreflect.FileDescriptor
View Source
var HooksPlugin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "HooksPlugin",
	HandlerType: (*HooksPluginServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Init",
			Handler:    _HooksPlugin_Init_Handler,
		},
		{
			MethodName: "Name",
			Handler:    _HooksPlugin_Name_Handler,
		},
		{
			MethodName: "Version",
			Handler:    _HooksPlugin_Version_Handler,
		},
		{
			MethodName: "Success",
			Handler:    _HooksPlugin_Success_Handler,
		},
		{
			MethodName: "NoRelease",
			Handler:    _HooksPlugin_NoRelease_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/hooks/hooks.proto",
}

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

Functions

func RegisterHooksPluginServer

func RegisterHooksPluginServer(s grpc.ServiceRegistrar, srv HooksPluginServer)

Types

type ChainedHooksExecutor

type ChainedHooksExecutor struct {
	HooksChain []Hooks
}

func (*ChainedHooksExecutor) GetNameVersionPairs

func (c *ChainedHooksExecutor) GetNameVersionPairs() []string

func (*ChainedHooksExecutor) Init

func (c *ChainedHooksExecutor) Init(conf map[string]string) error

func (*ChainedHooksExecutor) NoRelease

func (c *ChainedHooksExecutor) NoRelease(config *NoReleaseConfig) error

func (*ChainedHooksExecutor) Success

func (c *ChainedHooksExecutor) Success(config *SuccessHookConfig) error

type Client

type Client struct {
	Impl HooksPluginClient
}

func (*Client) Init

func (h *Client) Init(m map[string]string) error

func (*Client) Name

func (h *Client) Name() string

func (*Client) NoRelease

func (h *Client) NoRelease(config *NoReleaseConfig) error

func (*Client) Success

func (h *Client) Success(config *SuccessHookConfig) error

func (*Client) Version

func (h *Client) Version() string

type Hooks

type Hooks interface {
	Init(map[string]string) error
	Name() string
	Version() string
	Success(*SuccessHookConfig) error
	NoRelease(*NoReleaseConfig) error
}

type HooksInit

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

func (*HooksInit) Descriptor deprecated

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

Deprecated: Use HooksInit.ProtoReflect.Descriptor instead.

func (*HooksInit) ProtoMessage

func (*HooksInit) ProtoMessage()

func (*HooksInit) ProtoReflect

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

func (*HooksInit) Reset

func (x *HooksInit) Reset()

func (*HooksInit) String

func (x *HooksInit) String() string

type HooksInit_Request

type HooksInit_Request struct {
	Config map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*HooksInit_Request) Descriptor deprecated

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

Deprecated: Use HooksInit_Request.ProtoReflect.Descriptor instead.

func (*HooksInit_Request) GetConfig

func (x *HooksInit_Request) GetConfig() map[string]string

func (*HooksInit_Request) ProtoMessage

func (*HooksInit_Request) ProtoMessage()

func (*HooksInit_Request) ProtoReflect

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

func (*HooksInit_Request) Reset

func (x *HooksInit_Request) Reset()

func (*HooksInit_Request) String

func (x *HooksInit_Request) String() string

type HooksInit_Response

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

func (*HooksInit_Response) Descriptor deprecated

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

Deprecated: Use HooksInit_Response.ProtoReflect.Descriptor instead.

func (*HooksInit_Response) GetError

func (x *HooksInit_Response) GetError() string

func (*HooksInit_Response) ProtoMessage

func (*HooksInit_Response) ProtoMessage()

func (*HooksInit_Response) ProtoReflect

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

func (*HooksInit_Response) Reset

func (x *HooksInit_Response) Reset()

func (*HooksInit_Response) String

func (x *HooksInit_Response) String() string

type HooksName

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

func (*HooksName) Descriptor deprecated

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

Deprecated: Use HooksName.ProtoReflect.Descriptor instead.

func (*HooksName) ProtoMessage

func (*HooksName) ProtoMessage()

func (*HooksName) ProtoReflect

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

func (*HooksName) Reset

func (x *HooksName) Reset()

func (*HooksName) String

func (x *HooksName) String() string

type HooksName_Request

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

func (*HooksName_Request) Descriptor deprecated

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

Deprecated: Use HooksName_Request.ProtoReflect.Descriptor instead.

func (*HooksName_Request) ProtoMessage

func (*HooksName_Request) ProtoMessage()

func (*HooksName_Request) ProtoReflect

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

func (*HooksName_Request) Reset

func (x *HooksName_Request) Reset()

func (*HooksName_Request) String

func (x *HooksName_Request) String() string

type HooksName_Response

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

func (*HooksName_Response) Descriptor deprecated

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

Deprecated: Use HooksName_Response.ProtoReflect.Descriptor instead.

func (*HooksName_Response) GetName

func (x *HooksName_Response) GetName() string

func (*HooksName_Response) ProtoMessage

func (*HooksName_Response) ProtoMessage()

func (*HooksName_Response) ProtoReflect

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

func (*HooksName_Response) Reset

func (x *HooksName_Response) Reset()

func (*HooksName_Response) String

func (x *HooksName_Response) String() string

type HooksPluginClient

HooksPluginClient is the client API for HooksPlugin 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 HooksPluginServer

HooksPluginServer is the server API for HooksPlugin service. All implementations must embed UnimplementedHooksPluginServer for forward compatibility

type HooksVersion

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

func (*HooksVersion) Descriptor deprecated

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

Deprecated: Use HooksVersion.ProtoReflect.Descriptor instead.

func (*HooksVersion) ProtoMessage

func (*HooksVersion) ProtoMessage()

func (*HooksVersion) ProtoReflect

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

func (*HooksVersion) Reset

func (x *HooksVersion) Reset()

func (*HooksVersion) String

func (x *HooksVersion) String() string

type HooksVersion_Request

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

func (*HooksVersion_Request) Descriptor deprecated

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

Deprecated: Use HooksVersion_Request.ProtoReflect.Descriptor instead.

func (*HooksVersion_Request) ProtoMessage

func (*HooksVersion_Request) ProtoMessage()

func (*HooksVersion_Request) ProtoReflect

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

func (*HooksVersion_Request) Reset

func (x *HooksVersion_Request) Reset()

func (*HooksVersion_Request) String

func (x *HooksVersion_Request) String() string

type HooksVersion_Response

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

func (*HooksVersion_Response) Descriptor deprecated

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

Deprecated: Use HooksVersion_Response.ProtoReflect.Descriptor instead.

func (*HooksVersion_Response) GetVersion

func (x *HooksVersion_Response) GetVersion() string

func (*HooksVersion_Response) ProtoMessage

func (*HooksVersion_Response) ProtoMessage()

func (*HooksVersion_Response) ProtoReflect

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

func (*HooksVersion_Response) Reset

func (x *HooksVersion_Response) Reset()

func (*HooksVersion_Response) String

func (x *HooksVersion_Response) String() string

type NoReleaseConfig

type NoReleaseConfig struct {
	Reason  NoReleaseReason `protobuf:"varint,1,opt,name=reason,proto3,enum=NoReleaseReason" json:"reason,omitempty"`
	Message string          `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*NoReleaseConfig) Descriptor deprecated

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

Deprecated: Use NoReleaseConfig.ProtoReflect.Descriptor instead.

func (*NoReleaseConfig) GetMessage

func (x *NoReleaseConfig) GetMessage() string

func (*NoReleaseConfig) GetReason

func (x *NoReleaseConfig) GetReason() NoReleaseReason

func (*NoReleaseConfig) ProtoMessage

func (*NoReleaseConfig) ProtoMessage()

func (*NoReleaseConfig) ProtoReflect

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

func (*NoReleaseConfig) Reset

func (x *NoReleaseConfig) Reset()

func (*NoReleaseConfig) String

func (x *NoReleaseConfig) String() string

type NoReleaseHook

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

func (*NoReleaseHook) Descriptor deprecated

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

Deprecated: Use NoReleaseHook.ProtoReflect.Descriptor instead.

func (*NoReleaseHook) ProtoMessage

func (*NoReleaseHook) ProtoMessage()

func (*NoReleaseHook) ProtoReflect

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

func (*NoReleaseHook) Reset

func (x *NoReleaseHook) Reset()

func (*NoReleaseHook) String

func (x *NoReleaseHook) String() string

type NoReleaseHook_Request

type NoReleaseHook_Request struct {
	Config *NoReleaseConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*NoReleaseHook_Request) Descriptor deprecated

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

Deprecated: Use NoReleaseHook_Request.ProtoReflect.Descriptor instead.

func (*NoReleaseHook_Request) GetConfig

func (x *NoReleaseHook_Request) GetConfig() *NoReleaseConfig

func (*NoReleaseHook_Request) ProtoMessage

func (*NoReleaseHook_Request) ProtoMessage()

func (*NoReleaseHook_Request) ProtoReflect

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

func (*NoReleaseHook_Request) Reset

func (x *NoReleaseHook_Request) Reset()

func (*NoReleaseHook_Request) String

func (x *NoReleaseHook_Request) String() string

type NoReleaseHook_Response

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

func (*NoReleaseHook_Response) Descriptor deprecated

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

Deprecated: Use NoReleaseHook_Response.ProtoReflect.Descriptor instead.

func (*NoReleaseHook_Response) GetError

func (x *NoReleaseHook_Response) GetError() string

func (*NoReleaseHook_Response) ProtoMessage

func (*NoReleaseHook_Response) ProtoMessage()

func (*NoReleaseHook_Response) ProtoReflect

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

func (*NoReleaseHook_Response) Reset

func (x *NoReleaseHook_Response) Reset()

func (*NoReleaseHook_Response) String

func (x *NoReleaseHook_Response) String() string

type NoReleaseReason

type NoReleaseReason int32
const (
	NoReleaseReason_CONDITION NoReleaseReason = 0
	NoReleaseReason_NO_CHANGE NoReleaseReason = 1
)

func (NoReleaseReason) Descriptor

func (NoReleaseReason) Enum

func (x NoReleaseReason) Enum() *NoReleaseReason

func (NoReleaseReason) EnumDescriptor deprecated

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

Deprecated: Use NoReleaseReason.Descriptor instead.

func (NoReleaseReason) Number

func (NoReleaseReason) String

func (x NoReleaseReason) String() string

func (NoReleaseReason) Type

type Server

type Server struct {
	Impl Hooks
	UnimplementedHooksPluginServer
}

func (*Server) Init

func (*Server) Name

func (*Server) NoRelease

func (*Server) Success

func (*Server) Version

type SuccessHook

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

func (*SuccessHook) Descriptor deprecated

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

Deprecated: Use SuccessHook.ProtoReflect.Descriptor instead.

func (*SuccessHook) ProtoMessage

func (*SuccessHook) ProtoMessage()

func (*SuccessHook) ProtoReflect

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

func (*SuccessHook) Reset

func (x *SuccessHook) Reset()

func (*SuccessHook) String

func (x *SuccessHook) String() string

type SuccessHookConfig

type SuccessHookConfig struct {
	Commits     []*semrel.Commit         `protobuf:"bytes,1,rep,name=commits,proto3" json:"commits,omitempty"`
	PrevRelease *semrel.Release          `protobuf:"bytes,2,opt,name=prev_release,json=prevRelease,proto3" json:"prev_release,omitempty"`
	NewRelease  *semrel.Release          `protobuf:"bytes,3,opt,name=new_release,json=newRelease,proto3" json:"new_release,omitempty"`
	Changelog   string                   `protobuf:"bytes,4,opt,name=changelog,proto3" json:"changelog,omitempty"`
	RepoInfo    *provider.RepositoryInfo `protobuf:"bytes,5,opt,name=repo_info,json=repoInfo,proto3" json:"repo_info,omitempty"`
	// contains filtered or unexported fields
}

func (*SuccessHookConfig) Descriptor deprecated

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

Deprecated: Use SuccessHookConfig.ProtoReflect.Descriptor instead.

func (*SuccessHookConfig) GetChangelog

func (x *SuccessHookConfig) GetChangelog() string

func (*SuccessHookConfig) GetCommits

func (x *SuccessHookConfig) GetCommits() []*semrel.Commit

func (*SuccessHookConfig) GetNewRelease

func (x *SuccessHookConfig) GetNewRelease() *semrel.Release

func (*SuccessHookConfig) GetPrevRelease

func (x *SuccessHookConfig) GetPrevRelease() *semrel.Release

func (*SuccessHookConfig) GetRepoInfo

func (x *SuccessHookConfig) GetRepoInfo() *provider.RepositoryInfo

func (*SuccessHookConfig) ProtoMessage

func (*SuccessHookConfig) ProtoMessage()

func (*SuccessHookConfig) ProtoReflect

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

func (*SuccessHookConfig) Reset

func (x *SuccessHookConfig) Reset()

func (*SuccessHookConfig) String

func (x *SuccessHookConfig) String() string

type SuccessHook_Request

type SuccessHook_Request struct {
	Config *SuccessHookConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*SuccessHook_Request) Descriptor deprecated

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

Deprecated: Use SuccessHook_Request.ProtoReflect.Descriptor instead.

func (*SuccessHook_Request) GetConfig

func (x *SuccessHook_Request) GetConfig() *SuccessHookConfig

func (*SuccessHook_Request) ProtoMessage

func (*SuccessHook_Request) ProtoMessage()

func (*SuccessHook_Request) ProtoReflect

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

func (*SuccessHook_Request) Reset

func (x *SuccessHook_Request) Reset()

func (*SuccessHook_Request) String

func (x *SuccessHook_Request) String() string

type SuccessHook_Response

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

func (*SuccessHook_Response) Descriptor deprecated

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

Deprecated: Use SuccessHook_Response.ProtoReflect.Descriptor instead.

func (*SuccessHook_Response) GetError

func (x *SuccessHook_Response) GetError() string

func (*SuccessHook_Response) ProtoMessage

func (*SuccessHook_Response) ProtoMessage()

func (*SuccessHook_Response) ProtoReflect

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

func (*SuccessHook_Response) Reset

func (x *SuccessHook_Response) Reset()

func (*SuccessHook_Response) String

func (x *SuccessHook_Response) String() string

type UnimplementedHooksPluginServer

type UnimplementedHooksPluginServer struct {
}

UnimplementedHooksPluginServer must be embedded to have forward compatible implementations.

func (UnimplementedHooksPluginServer) Init

func (UnimplementedHooksPluginServer) Name

func (UnimplementedHooksPluginServer) NoRelease

func (UnimplementedHooksPluginServer) Success

func (UnimplementedHooksPluginServer) Version

type UnsafeHooksPluginServer added in v2.12.0

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

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

Jump to

Keyboard shortcuts

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