bot

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(dynamicClient dynamic.Interface, namespace string) *server

Types

type Adapter

type Adapter interface {
	// Parses requested command
	Parse(r *http.Request) (Command, error)
	// Sends formatted response
	SendResponse(content string, w http.ResponseWriter)
}

Adapter encapsulates integration with the notification service

type Command

type Command struct {
	Service           string
	Recipient         string
	ListSubscriptions *ListSubscriptions
	Subscribe         *UpdateSubscription
	Unsubscribe       *UpdateSubscription
}

type ListSubscriptions

type ListSubscriptions struct {
}

type Server

type Server interface {
	Serve(port int) error
	AddAdapter(path string, adapter Adapter)
}

type UpdateSubscription

type UpdateSubscription struct {
	App     string
	Project string
	Trigger string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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