events

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package events is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

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

func NewApi

func NewApi(handler Handler, log logrus.FieldLogger) *Api

func (*Api) ListEvents

func (a *Api) ListEvents(ctx context.Context, params events.ListEventsParams) middleware.Responder

type Event

type Event struct {
	gorm.Model
	models.Event
}

type Events

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

func New

func New(db *gorm.DB, log logrus.FieldLogger) *Events

func (*Events) AddEvent

func (e *Events) AddEvent(ctx context.Context, clusterID strfmt.UUID, hostID *strfmt.UUID, severity string, msg string, eventTime time.Time)

func (Events) DeleteClusterEvents

func (e Events) DeleteClusterEvents(clusterID strfmt.UUID)

func (Events) GetEvents

func (e Events) GetEvents(clusterID strfmt.UUID, hostID *strfmt.UUID) ([]*Event, error)

type Handler

type Handler interface {
	// AddEvents and an event for and entityID.
	// Since events, might relate to multiple entities, for example:
	//     host added to cluster, we have the host-id as the main entityID and
	//     the cluster-id as another ID that this event should be related to
	// otherEntities arguments provides for specifying mor IDs that are relevant for this event
	AddEvent(ctx context.Context, clusterID strfmt.UUID, hostID *strfmt.UUID, severity string, msg string, eventTime time.Time)
	GetEvents(clusterID strfmt.UUID, hostID *strfmt.UUID) ([]*Event, error)
	DeleteClusterEvents(clusterID strfmt.UUID)
}

type MockHandler

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

MockHandler is a mock of Handler interface

func NewMockHandler

func NewMockHandler(ctrl *gomock.Controller) *MockHandler

NewMockHandler creates a new mock instance

func (*MockHandler) AddEvent

func (m *MockHandler) AddEvent(ctx context.Context, clusterID strfmt.UUID, hostID *strfmt.UUID, severity, msg string, eventTime time.Time)

AddEvent mocks base method

func (*MockHandler) DeleteClusterEvents

func (m *MockHandler) DeleteClusterEvents(clusterID strfmt.UUID)

DeleteClusterEvents mocks base method

func (*MockHandler) EXPECT

func (m *MockHandler) EXPECT() *MockHandlerMockRecorder

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

func (*MockHandler) GetEvents

func (m *MockHandler) GetEvents(clusterID strfmt.UUID, hostID *strfmt.UUID) ([]*Event, error)

GetEvents mocks base method

type MockHandlerMockRecorder

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

MockHandlerMockRecorder is the mock recorder for MockHandler

func (*MockHandlerMockRecorder) AddEvent

func (mr *MockHandlerMockRecorder) AddEvent(ctx, clusterID, hostID, severity, msg, eventTime interface{}) *gomock.Call

AddEvent indicates an expected call of AddEvent

func (*MockHandlerMockRecorder) DeleteClusterEvents

func (mr *MockHandlerMockRecorder) DeleteClusterEvents(clusterID interface{}) *gomock.Call

DeleteClusterEvents indicates an expected call of DeleteClusterEvents

func (*MockHandlerMockRecorder) GetEvents

func (mr *MockHandlerMockRecorder) GetEvents(clusterID, hostID interface{}) *gomock.Call

GetEvents indicates an expected call of GetEvents

Jump to

Keyboard shortcuts

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