model

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalid occurs when checks fails
	ErrInvalid = errors.New("invalid")

	// ErrNotFound occurs when somehint is not found
	ErrNotFound = errors.New("not found")

	// ErrInternalError occurs when shit happens
	ErrInternalError = errors.New("internal error")
)

Functions

func ConcatError added in v1.3.0

func ConcatError(errs []error) error

ConcatError concat errors to a single string

func WrapInternal added in v1.3.0

func WrapInternal(err error) error

WrapInternal wraps given error with internal err

func WrapInvalid added in v1.3.0

func WrapInvalid(err error) error

WrapInvalid wraps given error with invalid err

func WrapNotFound added in v1.3.0

func WrapNotFound(err error) error

WrapNotFound wraps given error with not found err

Types

type Commit

type Commit struct {
	Hash       string    `json:"hash"`
	Type       string    `json:"type"`
	Component  string    `json:"component"`
	Content    string    `json:"content"`
	Remote     string    `json:"remote"`
	Repository string    `json:"repository"`
	Date       time.Time `json:"date"`
	Breaking   bool      `json:"breaking"`
	Revert     bool      `json:"revert"`
}

Commit describes a commit on a repository

func (Commit) Check

func (c Commit) Check() error

Check verifies that Commit is valid

func (Commit) Sanitize

func (c Commit) Sanitize() Commit

Sanitize cleans value of a commit

type Message added in v1.3.0

type Message struct {
	Level   string
	Content string
}

Message for render

func NewErrorMessage added in v1.3.0

func NewErrorMessage(content string) Message

NewErrorMessage create a error message

func NewSuccessMessage added in v1.3.0

func NewSuccessMessage(content string) Message

NewSuccessMessage create a success message

func ParseMessage added in v1.3.0

func ParseMessage(r *http.Request) Message

ParseMessage parses messages from request

Jump to

Keyboard shortcuts

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