types

package
v0.0.0-...-3d20527 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: Apache-2.0 Imports: 2 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RulesConfigFileName = ".rivi.yaml"
)

Functions

This section is empty.

Types

type Comment

type Comment struct {
	Commenter string
	Comment   string
}

type Data

type Data interface {
	ReadOnlyData
	MutableData
}

type ExtendedData

type ExtendedData interface {
	Data
	GetPatch() map[string]*string
}

type HookData

type HookData interface {
	ReadOnlyData
}

type InfoData

type InfoData interface {
	GetShortName() string
	GetLongName() string
	GetProvider() string
	GetRepository() Repository
}

type MutableData

type MutableData interface {
	AddLabel(label string)
	RemoveLabel(label string)
	AddAssignees(assignees ...string)
	RemoveAssignees(assignees ...string)
	AddComment(comment string)
}

type Origin

type Origin struct {
	User   string
	Repo   string
	Ref    string
	Head   string
	SHA    string
	GitURL string
}

type RawData

type RawData interface {
	GetRawPayload() []byte
	GetRawType() string
}

type ReadOnlyData

type ReadOnlyData interface {
	InfoData
	RawData
	GetNumber() int
	GetTitle() string
	GetDescription() string
	GetState() string
	GetOrigin() Origin
	GetOwner() string
	GetRepo() string
	GetRef() string
	GetLabels() []string
	HasLabel(label string) bool
	GetAssignees() []string
	HasAssignee(assignee string) bool
	GetComments() []Comment
	GetFileNames() []string
	GetChangedFiles() int
	GetFileExtensions() []string
	GetChanges() (int, int)
}

type Repository

type Repository interface {
	GetCollaborators() []string
	IsCollaborator(name string) bool
	GetAvailableLabels() []string
	GetRulesFile() string
}

type State

type State int
const (
	Failure State = iota
	Pending
	Success
	Error
)

func GetState

func GetState(value string) State

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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