msg

package
v0.8.12 Latest Latest
Warning

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

Go to latest
Published: May 18, 2017 License: BSD-2-Clause, BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	IsDetailed bool
	Job        proto.JobFilter
}

type Request

type Request struct {
	Type       string
	Action     string
	RemoteAddr string
	User       string
	IsAdmin    bool
	Reply      chan Result
	Search     Filter

	Super      *Supervisor
	Category   proto.Category
	Permission proto.Permission
	Grant      proto.Grant
	Job        proto.Job
	Tree       proto.Tree
	System     proto.SystemOperation
}

type Result

type Result struct {
	Type   string
	Action string
	Code   uint16
	Error  error
	JobId  string

	Super      *Supervisor
	Tree       proto.Tree
	Category   []proto.Category
	Permission []proto.Permission
	Grant      []proto.Grant
	Job        []proto.Job
	System     []proto.SystemOperation
}

func (*Result) Accepted

func (r *Result) Accepted()

func (*Result) BadRequest

func (r *Result) BadRequest(err error)

func (*Result) Clear

func (r *Result) Clear(s string)

func (*Result) Conflict

func (r *Result) Conflict(err error)

func (*Result) Forbidden

func (r *Result) Forbidden(err error)

func (*Result) NotFound

func (r *Result) NotFound(err error)

func (*Result) NotImplemented

func (r *Result) NotImplemented(err error)

func (*Result) OK

func (r *Result) OK()

func (*Result) Partial

func (r *Result) Partial()

func (*Result) RowCnt

func (r *Result) RowCnt(i int64, err error) bool

func (*Result) ServerError

func (r *Result) ServerError(err error)

func (*Result) SetError

func (r *Result) SetError(err error)

func (*Result) Unauthorized

func (r *Result) Unauthorized(err error)

func (*Result) Unavailable

func (r *Result) Unavailable(err error)

type Supervisor

type Supervisor struct {
	Verdict      uint16
	VerdictAdmin bool
	RemoteAddr   string
	// Fields for encrypted requests
	KexId string
	Data  []byte
	Kex   auth.Kex
	// Fields for basic authentication requests
	BasicAuthUser  string
	BasicAuthToken string
	Restricted     bool
	// Fields for permission authorization requests
	PermAction     string
	PermRepository string
	PermMonitoring string
	PermNode       string
	// Fields for map update notifications
	Action string
	Object string
	User   proto.User
	Team   proto.Team
	// Fields for Grant revocation
	GrantId string
}

Jump to

Keyboard shortcuts

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