bot

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: Apache-2.0 Imports: 10 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 {
	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