syncserve

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Repository string
	Branch     string
	Action     string
}

Event ...

func (*Event) String

func (e *Event) String() string

String ...

type FileSystem

type FileSystem struct {
	Logger *log.Entry
	// contains filtered or unexported fields
}

func NewNeuteredFileSystem

func NewNeuteredFileSystem(fs http.FileSystem, logger *log.Entry) FileSystem

func (FileSystem) Open

func (nfs FileSystem) Open(path string) (http.File, error)

Open ...

type GitSync

type GitSync struct {
	RepositoryURL          string
	Destination            string
	Path                   string
	Branch                 string
	KeyPath                string
	KnownHostsVerification bool
	Logger                 *log.Entry
	EventChannel           chan Event
}

GitSync struct represents something

func (*GitSync) Clone

func (gs *GitSync) Clone(ctx context.Context) error

Clone ...

func (*GitSync) Pull

func (gs *GitSync) Pull(ctx context.Context, path string) error

Pull ...

func (*GitSync) Start

func (gs *GitSync) Start() error

Start ...

type Webhook

type Webhook struct {
	URL             string
	Method          string
	PayloadTemplate string
	ContentType     string
	Logger          *log.Entry
}

Webhook ...

func (*Webhook) Send

func (w *Webhook) Send(e *Event) error

Send ...

func (*Webhook) Start

func (w *Webhook) Start(ch chan Event)

Start the loop to send notifications

Jump to

Keyboard shortcuts

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