core

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package core is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log interface {
	ID() int64
	Write(ctx context.Context, line *LogLine) error
	Save(ctx context.Context) error
	Remove(ctx context.Context) error
	Cat(ctx context.Context) ([]*LogLine, error)
	Tail(ctx context.Context) (<-chan *LogLine, error)
	Close(ctx context.Context) error
}

Log is a log file

type LogLine

type LogLine struct {
	Number    int64     `json:"line"`
	Text      string    `json:"text"`
	Timestamp time.Time `json:"time"`
}

LogLine holds line information in log

type LogManager

type LogManager interface {
	Create() (Log, error)
	Open(id int64) (Log, error)
	Close(id int64) error
}

LogManager manages log files

type LogStore

type LogStore interface {
	Create(r io.Reader) (int64, error)
	Exists(id int64) bool
	Find(id int64) (io.ReadCloser, error)
	Update(id int64, r io.Reader) error
	Delete(id int64) error
}

LogStore is a storage to save log output

type LogStream

type LogStream interface {
	Create(ctx context.Context, id int64) error
	Write(ctx context.Context, id int64, line *LogLine) error
	Delete(ctx context.Context, id int64) error
	Tail(ctx context.Context, id int64) (<-chan *LogLine, error)
}

LogStream provides log streaming

type MockLogStore

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

MockLogStore is a mock of LogStore interface

func NewMockLogStore

func NewMockLogStore(ctrl *gomock.Controller) *MockLogStore

NewMockLogStore creates a new mock instance

func (*MockLogStore) Create

func (m *MockLogStore) Create(arg0 io.Reader) (int64, error)

Create mocks base method

func (*MockLogStore) Delete

func (m *MockLogStore) Delete(arg0 int64) error

Delete mocks base method

func (*MockLogStore) EXPECT

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

func (*MockLogStore) Find

func (m *MockLogStore) Find(arg0 int64) (io.ReadCloser, error)

Find mocks base method

func (*MockLogStore) Update

func (m *MockLogStore) Update(arg0 int64, arg1 io.Reader) error

Update mocks base method

type MockLogStoreMockRecorder

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

MockLogStoreMockRecorder is the mock recorder for MockLogStore

func (*MockLogStoreMockRecorder) Create

func (mr *MockLogStoreMockRecorder) Create(arg0 interface{}) *gomock.Call

Create indicates an expected call of Create

func (*MockLogStoreMockRecorder) Delete

func (mr *MockLogStoreMockRecorder) Delete(arg0 interface{}) *gomock.Call

Delete indicates an expected call of Delete

func (*MockLogStoreMockRecorder) Find

func (mr *MockLogStoreMockRecorder) Find(arg0 interface{}) *gomock.Call

Find indicates an expected call of Find

func (*MockLogStoreMockRecorder) Update

func (mr *MockLogStoreMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call

Update indicates an expected call of Update

Jump to

Keyboard shortcuts

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