database

package
v0.0.0-...-7627a42 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package database is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBOpenAPILoader

type DBOpenAPILoader interface {
	Load(dbStoragePath string) error
	SpecificationRaw(schemaID int) []byte
	SpecificationVersion(schemaID int) string
	Specification(schemaID int) *openapi3.T
	IsLoaded(schemaID int) bool
	SchemaIDs() []int
}

func NewOpenAPIDB

func NewOpenAPIDB(log *logrus.Logger, dbStoragePath string) (DBOpenAPILoader, error)

type MockDBOpenAPILoader

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

MockDBOpenAPILoader is a mock of DBOpenAPILoader interface.

func NewMockDBOpenAPILoader

func NewMockDBOpenAPILoader(ctrl *gomock.Controller) *MockDBOpenAPILoader

NewMockDBOpenAPILoader creates a new mock instance.

func (*MockDBOpenAPILoader) EXPECT

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

func (*MockDBOpenAPILoader) IsLoaded

func (m *MockDBOpenAPILoader) IsLoaded(schemaID int) bool

IsLoaded mocks base method.

func (*MockDBOpenAPILoader) Load

func (m *MockDBOpenAPILoader) Load(dbStoragePath string) error

Load mocks base method.

func (*MockDBOpenAPILoader) SchemaIDs

func (m *MockDBOpenAPILoader) SchemaIDs() []int

SchemaIDs mocks base method.

func (*MockDBOpenAPILoader) Specification

func (m *MockDBOpenAPILoader) Specification(schemaID int) *openapi3.T

Specification mocks base method.

func (*MockDBOpenAPILoader) SpecificationRaw

func (m *MockDBOpenAPILoader) SpecificationRaw(schemaID int) []byte

SpecificationRaw mocks base method.

func (*MockDBOpenAPILoader) SpecificationVersion

func (m *MockDBOpenAPILoader) SpecificationVersion(schemaID int) string

SpecificationVersion mocks base method.

type MockDBOpenAPILoaderMockRecorder

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

MockDBOpenAPILoaderMockRecorder is the mock recorder for MockDBOpenAPILoader.

func (*MockDBOpenAPILoaderMockRecorder) IsLoaded

func (mr *MockDBOpenAPILoaderMockRecorder) IsLoaded(schemaID interface{}) *gomock.Call

IsLoaded indicates an expected call of IsLoaded.

func (*MockDBOpenAPILoaderMockRecorder) Load

func (mr *MockDBOpenAPILoaderMockRecorder) Load(dbStoragePath interface{}) *gomock.Call

Load indicates an expected call of Load.

func (*MockDBOpenAPILoaderMockRecorder) SchemaIDs

func (mr *MockDBOpenAPILoaderMockRecorder) SchemaIDs() *gomock.Call

SchemaIDs indicates an expected call of SchemaIDs.

func (*MockDBOpenAPILoaderMockRecorder) Specification

func (mr *MockDBOpenAPILoaderMockRecorder) Specification(schemaID interface{}) *gomock.Call

Specification indicates an expected call of Specification.

func (*MockDBOpenAPILoaderMockRecorder) SpecificationRaw

func (mr *MockDBOpenAPILoaderMockRecorder) SpecificationRaw(schemaID interface{}) *gomock.Call

SpecificationRaw indicates an expected call of SpecificationRaw.

func (*MockDBOpenAPILoaderMockRecorder) SpecificationVersion

func (mr *MockDBOpenAPILoaderMockRecorder) SpecificationVersion(schemaID interface{}) *gomock.Call

SpecificationVersion indicates an expected call of SpecificationVersion.

type OpenAPISpecStorage

type OpenAPISpecStorage struct {
	Specs []SpecificationEntry
}

type SQLLite

type SQLLite struct {
	Log         *logrus.Logger
	RawSpecs    map[int]*SpecificationEntry
	LastUpdate  time.Time
	OpenAPISpec map[int]*openapi3.T
	// contains filtered or unexported fields
}

func (*SQLLite) IsLoaded

func (s *SQLLite) IsLoaded(schemaID int) bool

func (*SQLLite) Load

func (s *SQLLite) Load(dbStoragePath string) error

func (*SQLLite) SchemaIDs

func (s *SQLLite) SchemaIDs() []int

func (*SQLLite) Specification

func (s *SQLLite) Specification(schemaID int) *openapi3.T

func (*SQLLite) SpecificationRaw

func (s *SQLLite) SpecificationRaw(schemaID int) []byte

func (*SQLLite) SpecificationVersion

func (s *SQLLite) SpecificationVersion(schemaID int) string

type SpecificationEntry

type SpecificationEntry struct {
	SchemaID      int    `db:"schema_id"`
	SchemaVersion string `db:"schema_version"`
	SchemaFormat  string `db:"schema_format"`
	SchemaContent string `db:"schema_content"`
}

Jump to

Keyboard shortcuts

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