Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthenticationPlugin ¶
type AuthenticationPlugin interface { // Run runs the plugin. The plugin runs until the context is canceled and the server returned // by this function is expected to remain functional until then. Run(ctx context.Context, config interface{}) (common.AuthenticationPluginServer, error) }
AuthenticationPlugin adds support for API authentication
type IntegrationPlugin ¶
type IntegrationPlugin interface { // Run runs the plugin. Once this function returns the plugin stops running. // Implementors must respect the context deadline as that's the signal for graceful shutdown. Run(ctx context.Context, config interface{}, srv *Services) error }
IntegrationPlugin works on the public Bhojpur Piro API
type ProxyPassPlugin ¶
ProxyPassPlugin adds additional support for proxied webhooks
type RepositoryPlugin ¶
type RepositoryPlugin interface { // Run runs the plugin. The plugin runs until the context is canceled and the server returned // by this function is expected to remain functional until then. Run(ctx context.Context, config interface{}) (common.RepositoryPluginServer, error) }
RepositoryPlugin adds support for a repository host
type ServeOpt ¶
type ServeOpt struct { Type common.Type Run func(ctx context.Context, config interface{}, socket string) error }
ServeOpt configures a plugin serve
func WithAuthenticationPlugin ¶
func WithAuthenticationPlugin(p AuthenticationPlugin) ServeOpt
WithRepositoryPlugin registers repo plugin capabilities
func WithIntegrationPlugin ¶
func WithIntegrationPlugin(p IntegrationPlugin) ServeOpt
WithIntegrationPlugin registers integration plugin capabilities
func WithProxyPass ¶
func WithProxyPass(p ProxyPassPlugin) ServeOpt
WithProxyPass enables a "through Piro" proxy route to the plugin. The route will be available at "http://<piro-location>/plugins/<plugin-name>"
func WithRepositoryPlugin ¶
func WithRepositoryPlugin(p RepositoryPlugin) ServeOpt
WithRepositoryPlugin registers repo plugin capabilities
type Services ¶
type Services struct { v1.PiroServiceClient v1.PiroUIClient }
Click to show internal directories.
Click to hide internal directories.