handlers

package
v0.0.0-...-8c0b16f Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package handlers is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bulletin

Bulletin handles bulletin requests

func BulletinData

func BulletinData(cfg config.Config, ac ArticlesApiClient) http.HandlerFunc

func SixteensBulletin

func SixteensBulletin(cfg config.Config, rc RenderClient, zc ZebedeeClient, ac ArticlesApiClient) http.HandlerFunc

Bulletin handles bulletin requests

Types

type ArticlesApiClient

type ArticlesApiClient interface {
	GetLegacyBulletin(ctx context.Context, userAccessToken, collectionID, lang, uri string) (*articles.Bulletin, error)
}

ArticlesApiClient is an interface for the Articles API client

type ClientError

type ClientError interface {
	Error() string
	Code() int
}

ClientError is an interface that can be used to retrieve the status code if a client has errored

type MockArticlesApiClient

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

MockArticlesApiClient is a mock of ArticlesApiClient interface.

func NewMockArticlesApiClient

func NewMockArticlesApiClient(ctrl *gomock.Controller) *MockArticlesApiClient

NewMockArticlesApiClient creates a new mock instance.

func (*MockArticlesApiClient) EXPECT

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

func (*MockArticlesApiClient) GetLegacyBulletin

func (m *MockArticlesApiClient) GetLegacyBulletin(ctx context.Context, userAccessToken, collectionID, lang, uri string) (*articles.Bulletin, error)

GetLegacyBulletin mocks base method.

type MockArticlesApiClientMockRecorder

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

MockArticlesApiClientMockRecorder is the mock recorder for MockArticlesApiClient.

func (*MockArticlesApiClientMockRecorder) GetLegacyBulletin

func (mr *MockArticlesApiClientMockRecorder) GetLegacyBulletin(ctx, userAccessToken, collectionID, lang, uri interface{}) *gomock.Call

GetLegacyBulletin indicates an expected call of GetLegacyBulletin.

type MockClientError

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

MockClientError is a mock of ClientError interface.

func NewMockClientError

func NewMockClientError(ctrl *gomock.Controller) *MockClientError

NewMockClientError creates a new mock instance.

func (*MockClientError) Code

func (m *MockClientError) Code() int

Code mocks base method.

func (*MockClientError) EXPECT

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

func (*MockClientError) Error

func (m *MockClientError) Error() string

Error mocks base method.

type MockClientErrorMockRecorder

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

MockClientErrorMockRecorder is the mock recorder for MockClientError.

func (*MockClientErrorMockRecorder) Code

Code indicates an expected call of Code.

func (*MockClientErrorMockRecorder) Error

Error indicates an expected call of Error.

type MockRenderClient

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

MockRenderClient is a mock of RenderClient interface.

func NewMockRenderClient

func NewMockRenderClient(ctrl *gomock.Controller) *MockRenderClient

NewMockRenderClient creates a new mock instance.

func (*MockRenderClient) BuildPage

func (m *MockRenderClient) BuildPage(w io.Writer, pageModel interface{}, templateName string)

BuildPage mocks base method.

func (*MockRenderClient) EXPECT

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

func (*MockRenderClient) NewBasePageModel

func (m *MockRenderClient) NewBasePageModel() model.Page

NewBasePageModel mocks base method.

type MockRenderClientMockRecorder

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

MockRenderClientMockRecorder is the mock recorder for MockRenderClient.

func (*MockRenderClientMockRecorder) BuildPage

func (mr *MockRenderClientMockRecorder) BuildPage(w, pageModel, templateName interface{}) *gomock.Call

BuildPage indicates an expected call of BuildPage.

func (*MockRenderClientMockRecorder) NewBasePageModel

func (mr *MockRenderClientMockRecorder) NewBasePageModel() *gomock.Call

NewBasePageModel indicates an expected call of NewBasePageModel.

type MockZebedeeClient

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

MockZebedeeClient is a mock of ZebedeeClient interface.

func NewMockZebedeeClient

func NewMockZebedeeClient(ctrl *gomock.Controller) *MockZebedeeClient

NewMockZebedeeClient creates a new mock instance.

func (*MockZebedeeClient) EXPECT

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

func (*MockZebedeeClient) GetBreadcrumb

func (m *MockZebedeeClient) GetBreadcrumb(ctx context.Context, userAccessToken, collectionID, lang, uri string) ([]zebedee.Breadcrumb, error)

GetBreadcrumb mocks base method.

func (*MockZebedeeClient) GetHomepageContent

func (m *MockZebedeeClient) GetHomepageContent(ctx context.Context, userAccessToken, collectionID, lang, path string) (zebedee.HomepageContent, error)

GetHomepageContent mocks base method.

type MockZebedeeClientMockRecorder

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

MockZebedeeClientMockRecorder is the mock recorder for MockZebedeeClient.

func (*MockZebedeeClientMockRecorder) GetBreadcrumb

func (mr *MockZebedeeClientMockRecorder) GetBreadcrumb(ctx, userAccessToken, collectionID, lang, uri interface{}) *gomock.Call

GetBreadcrumb indicates an expected call of GetBreadcrumb.

func (*MockZebedeeClientMockRecorder) GetHomepageContent

func (mr *MockZebedeeClientMockRecorder) GetHomepageContent(ctx, userAccessToken, collectionID, lang, path interface{}) *gomock.Call

GetHomepageContent indicates an expected call of GetHomepageContent.

type RenderClient

type RenderClient interface {
	BuildPage(w io.Writer, pageModel interface{}, templateName string)
	NewBasePageModel() model.Page
}

RenderClient is an interface with methods for rendering a template

type ZebedeeClient

type ZebedeeClient interface {
	GetBreadcrumb(ctx context.Context, userAccessToken, collectionID, lang, uri string) ([]zebedee.Breadcrumb, error)
	GetHomepageContent(ctx context.Context, userAccessToken, collectionID, lang, path string) (m zebedee.HomepageContent, err error)
}

ZebedeeClient is an interface for zebedee client

Jump to

Keyboard shortcuts

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