request

package
v0.0.0-...-081ecb4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnonymousContext

type AnonymousContext struct {
	BaseContext
}

type AuthorizedContext

type AuthorizedContext struct {
	BaseContext

	auth.AuthenticatedUser
}

func (AuthorizedContext) ToAnonumousContext

func (ac AuthorizedContext) ToAnonumousContext() *AnonymousContext

type BaseContext

type BaseContext struct {
	Ctx  context.Context
	Log  logutil.Log
	Lctx logutil.Context
	DB   *gorm.DB

	StartedAt time.Time

	SessCtx *session.RequestContext
}

func (BaseContext) Logger

func (ctx BaseContext) Logger() logutil.Log

func (BaseContext) RequestStartedAt

func (ctx BaseContext) RequestStartedAt() time.Time

func (BaseContext) SessContext

func (ctx BaseContext) SessContext() *session.RequestContext

type Body

type Body []byte

func (Body) FillLogContext

func (b Body) FillLogContext(lctx logutil.Context)

type BodyRepo

type BodyRepo struct {
	Provider string
	Owner    string
	Name     string
}

func (BodyRepo) FillLogContext

func (r BodyRepo) FillLogContext(lctx logutil.Context)

func (BodyRepo) FullName

func (r BodyRepo) FullName() string

func (BodyRepo) String

func (r BodyRepo) String() string

type Context

type Context interface {
	RequestStartedAt() time.Time
	Logger() logutil.Log
	SessContext() *session.RequestContext
}

type InternalContext

type InternalContext struct {
	BaseContext
}

InternalContext used for internal requests and provides internal authorization

type Org

type Org struct {
	Provider string `request:",urlPart,"`
	Name     string `request:",urlPart,"`
}

func (Org) FillLogContext

func (o Org) FillLogContext(lctx logutil.Context)

type OrgID

type OrgID struct {
	OrgID uint `request:"org_id,urlPart,"`
}

func (OrgID) FillLogContext

func (o OrgID) FillLogContext(lctx logutil.Context)

type OrgSubID

type OrgSubID struct {
	OrgID
	SubID
}

func (OrgSubID) FillLogContext

func (os OrgSubID) FillLogContext(lctx logutil.Context)

type Repo

type Repo struct {
	Provider string `request:",urlPart,"`
	Owner    string `request:",urlPart,"`
	Name     string `request:",urlPart,"`
}

func (Repo) FillLogContext

func (r Repo) FillLogContext(lctx logutil.Context)

func (Repo) FullName

func (r Repo) FullName() string

func (Repo) FullNameWithProvider

func (r Repo) FullNameWithProvider() string

func (Repo) String

func (r Repo) String() string

type RepoID

type RepoID struct {
	ID uint `request:"repoID,urlPart,"`
}

func (RepoID) FillLogContext

func (r RepoID) FillLogContext(lctx logutil.Context)

type ShortRepo

type ShortRepo struct {
	Owner string `request:",urlPart,"`
	Name  string `request:",urlPart,"`
}

func (ShortRepo) FillLogContext

func (r ShortRepo) FillLogContext(lctx logutil.Context)

func (ShortRepo) FullName

func (r ShortRepo) FullName() string

func (ShortRepo) String

func (r ShortRepo) String() string

type SubID

type SubID struct {
	SubID uint `request:"sub_id,urlPart,"`
}

func (SubID) FillLogContext

func (s SubID) FillLogContext(lctx logutil.Context)

Jump to

Keyboard shortcuts

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