content

package
v0.0.0-...-c896b06 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package content is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoLogin = errors.New("must be logged in")
)

Functions

This section is empty.

Types

type Content

type Content struct {
	*c.Controller
	// contains filtered or unexported fields
}

func New

func New(log *log.Logger, db DBer, e3 E3er, hook Hooker, baseURL string) *Content

func (*Content) ServeHTTP

func (c *Content) ServeHTTP(w http.ResponseWriter, r *http.Request)

type DBer

type DBer interface {
	UserGet(username, password string) (user.User, error)
	UserGetFromToken(token string) (user.User, error)
	SpaceGet(user user.User, spaceID string) (space.Space, error)
	ContentTypeGet(space space.Space, contenttypeID string) (contenttype.ContentType, error)
	ContentNew(space space.Space, ct contenttype.ContentType, params []db.ContentNewParam) (content.Content, error)
	ContentGet(space space.Space, ct contenttype.ContentType, contentID string) (content.Content, error)
	ContentUpdate(space space.Space, ct contenttype.ContentType, content content.Content, newParams []db.ContentNewParam, updateParams []db.ContentUpdateParam) (content.Content, error)
	ContentDelete(space space.Space, ct contenttype.ContentType, content content.Content) error
	ContentSearch(space space.Space, ct contenttype.ContentType, name, query string, before int) (content.ContentList, error)
}

type E3er

type E3er interface {
	Upload(ctx context.Context, public bool, filename string, file io.Reader) (string, error)
}

type Hooker

type Hooker interface {
	Do(space space.Space, content content.Content, ht webhook.HookType)
}

type MockDBer

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

MockDBer is a mock of DBer interface.

func NewMockDBer

func NewMockDBer(ctrl *gomock.Controller) *MockDBer

NewMockDBer creates a new mock instance.

func (*MockDBer) ContentDelete

func (m *MockDBer) ContentDelete(arg0 space.Space, arg1 contenttype.ContentType, arg2 content.Content) error

ContentDelete mocks base method.

func (*MockDBer) ContentGet

func (m *MockDBer) ContentGet(arg0 space.Space, arg1 contenttype.ContentType, arg2 string) (content.Content, error)

ContentGet mocks base method.

func (*MockDBer) ContentNew

func (m *MockDBer) ContentNew(arg0 space.Space, arg1 contenttype.ContentType, arg2 []db.ContentNewParam) (content.Content, error)

ContentNew mocks base method.

func (*MockDBer) ContentPerContentType

func (m *MockDBer) ContentPerContentType(arg0 space.Space, arg1 contenttype.ContentType, arg2 int, arg3 db.OrderType, arg4 string) ([]content.Content, error)

ContentPerContentType mocks base method.

func (*MockDBer) ContentSearch

func (m *MockDBer) ContentSearch(arg0 space.Space, arg1 contenttype.ContentType, arg2, arg3 string, arg4 int) ([]content.Content, error)

ContentSearch mocks base method.

func (*MockDBer) ContentTypeGet

func (m *MockDBer) ContentTypeGet(arg0 space.Space, arg1 string) (contenttype.ContentType, error)

ContentTypeGet mocks base method.

func (*MockDBer) ContentUpdate

func (m *MockDBer) ContentUpdate(arg0 space.Space, arg1 contenttype.ContentType, arg2 content.Content, arg3 []db.ContentNewParam, arg4 []db.ContentUpdateParam) (content.Content, error)

ContentUpdate mocks base method.

func (*MockDBer) EXPECT

func (m *MockDBer) EXPECT() *MockDBerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDBer) SpaceGet

func (m *MockDBer) SpaceGet(arg0 user.User, arg1 string) (space.Space, error)

SpaceGet mocks base method.

func (*MockDBer) UserGet

func (m *MockDBer) UserGet(arg0, arg1 string) (user.User, error)

UserGet mocks base method.

func (*MockDBer) UserGetFromToken

func (m *MockDBer) UserGetFromToken(arg0 string) (user.User, error)

UserGetFromToken mocks base method.

type MockDBerMockRecorder

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

MockDBerMockRecorder is the mock recorder for MockDBer.

func (*MockDBerMockRecorder) ContentDelete

func (mr *MockDBerMockRecorder) ContentDelete(arg0, arg1, arg2 interface{}) *gomock.Call

ContentDelete indicates an expected call of ContentDelete.

func (*MockDBerMockRecorder) ContentGet

func (mr *MockDBerMockRecorder) ContentGet(arg0, arg1, arg2 interface{}) *gomock.Call

ContentGet indicates an expected call of ContentGet.

func (*MockDBerMockRecorder) ContentNew

func (mr *MockDBerMockRecorder) ContentNew(arg0, arg1, arg2 interface{}) *gomock.Call

ContentNew indicates an expected call of ContentNew.

func (*MockDBerMockRecorder) ContentPerContentType

func (mr *MockDBerMockRecorder) ContentPerContentType(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

ContentPerContentType indicates an expected call of ContentPerContentType.

func (*MockDBerMockRecorder) ContentSearch

func (mr *MockDBerMockRecorder) ContentSearch(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

ContentSearch indicates an expected call of ContentSearch.

func (*MockDBerMockRecorder) ContentTypeGet

func (mr *MockDBerMockRecorder) ContentTypeGet(arg0, arg1 interface{}) *gomock.Call

ContentTypeGet indicates an expected call of ContentTypeGet.

func (*MockDBerMockRecorder) ContentUpdate

func (mr *MockDBerMockRecorder) ContentUpdate(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

ContentUpdate indicates an expected call of ContentUpdate.

func (*MockDBerMockRecorder) SpaceGet

func (mr *MockDBerMockRecorder) SpaceGet(arg0, arg1 interface{}) *gomock.Call

SpaceGet indicates an expected call of SpaceGet.

func (*MockDBerMockRecorder) UserGet

func (mr *MockDBerMockRecorder) UserGet(arg0, arg1 interface{}) *gomock.Call

UserGet indicates an expected call of UserGet.

func (*MockDBerMockRecorder) UserGetFromToken

func (mr *MockDBerMockRecorder) UserGetFromToken(arg0 interface{}) *gomock.Call

UserGetFromToken indicates an expected call of UserGetFromToken.

type MockE3er

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

MockE3er is a mock of E3er interface.

func NewMockE3er

func NewMockE3er(ctrl *gomock.Controller) *MockE3er

NewMockE3er creates a new mock instance.

func (*MockE3er) EXPECT

func (m *MockE3er) EXPECT() *MockE3erMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockE3er) Upload

func (m *MockE3er) Upload(arg0 context.Context, arg1 bool, arg2 string, arg3 io.Reader) (string, error)

Upload mocks base method.

type MockE3erMockRecorder

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

MockE3erMockRecorder is the mock recorder for MockE3er.

func (*MockE3erMockRecorder) Upload

func (mr *MockE3erMockRecorder) Upload(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

Upload indicates an expected call of Upload.

type MockHooker

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

MockHooker is a mock of Hooker interface.

func NewMockHooker

func NewMockHooker(ctrl *gomock.Controller) *MockHooker

NewMockHooker creates a new mock instance.

func (*MockHooker) Do

func (m *MockHooker) Do(arg0 space.Space, arg1 content.Content, arg2 hook.HookType)

Do mocks base method.

func (*MockHooker) EXPECT

func (m *MockHooker) EXPECT() *MockHookerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

type MockHookerMockRecorder

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

MockHookerMockRecorder is the mock recorder for MockHooker.

func (*MockHookerMockRecorder) Do

func (mr *MockHookerMockRecorder) Do(arg0, arg1, arg2 interface{}) *gomock.Call

Do indicates an expected call of Do.

Jump to

Keyboard shortcuts

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