watcher

package
v0.0.0-...-e31f9e3 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2016 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

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

Git is the github source

func NewGit

func NewGit(username string) (*Git, error)

NewGit returns a new Git object

func (*Git) FetchFromOrigin

func (g *Git) FetchFromOrigin(vendorID string, t time.Time) ([]common.Record, error)

FetchFromOrigin implements the Source interface

func (*Git) GetHostName

func (g *Git) GetHostName() string

GetHostName implements the Source interface

type GitRecord

type GitRecord struct {
	Payload   string `json:"payload,omitempty"`
	CreatedAt string `json:created_at,omitempty`
}

GitRecord is a record from the api.github.com

type Mock

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

Mock is the mock source, which use file as source

func NewMock

func NewMock() (*Mock, error)

NewMock returns a Mock Object

func (*Mock) FetchFromOrigin

func (m *Mock) FetchFromOrigin(vendorID string, beginTime time.Time) ([]common.Record, error)

FetchFromOrigin implements the Source interface

func (*Mock) GetHostName

func (m *Mock) GetHostName() string

GetHostName implements the Source interface

type Payload

type Payload struct {
	Action string `json:"action,omitempty"`
}

Payload is the field in GitRecord

Jump to

Keyboard shortcuts

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