database

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MPL-2.0 Imports: 16 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
	AfterLoad(dbStoragePath string) error
	SpecificationRaw(schemaID int) interface{}
	SpecificationRawContent(schemaID int) []byte
	SpecificationVersion(schemaID int) string
	Specification(schemaID int) *openapi3.T
	IsLoaded(schemaID int) bool
	SchemaIDs() []int
	IsReady() bool
	ShouldUpdate(newStorage DBOpenAPILoader) bool
	Version() int
}

func NewOpenAPIDB

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

NewOpenAPIDB loads OAS specs from the database and returns the struct with the parsed specs

func NewOpenAPIDBV1 added in v0.6.17

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

func NewOpenAPIDBV2 added in v0.6.17

func NewOpenAPIDBV2(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) AfterLoad added in v0.6.17

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

AfterLoad mocks base method.

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) IsReady added in v0.6.14

func (m *MockDBOpenAPILoader) IsReady() bool

IsReady 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) ShouldUpdate added in v0.6.17

func (m *MockDBOpenAPILoader) ShouldUpdate(newStorage DBOpenAPILoader) bool

ShouldUpdate 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) interface{}

SpecificationRaw mocks base method.

func (*MockDBOpenAPILoader) SpecificationRawContent added in v0.6.17

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

SpecificationRawContent mocks base method.

func (*MockDBOpenAPILoader) SpecificationVersion

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

SpecificationVersion mocks base method.

func (*MockDBOpenAPILoader) Version added in v0.6.17

func (m *MockDBOpenAPILoader) Version() int

Version mocks base method.

type MockDBOpenAPILoaderMockRecorder

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

MockDBOpenAPILoaderMockRecorder is the mock recorder for MockDBOpenAPILoader.

func (*MockDBOpenAPILoaderMockRecorder) AfterLoad added in v0.6.17

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

AfterLoad indicates an expected call of AfterLoad.

func (*MockDBOpenAPILoaderMockRecorder) IsLoaded

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

IsLoaded indicates an expected call of IsLoaded.

func (*MockDBOpenAPILoaderMockRecorder) IsReady added in v0.6.14

IsReady indicates an expected call of IsReady.

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) ShouldUpdate added in v0.6.17

func (mr *MockDBOpenAPILoaderMockRecorder) ShouldUpdate(newStorage interface{}) *gomock.Call

ShouldUpdate indicates an expected call of ShouldUpdate.

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) SpecificationRawContent added in v0.6.17

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

SpecificationRawContent indicates an expected call of SpecificationRawContent.

func (*MockDBOpenAPILoaderMockRecorder) SpecificationVersion

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

SpecificationVersion indicates an expected call of SpecificationVersion.

func (*MockDBOpenAPILoaderMockRecorder) Version added in v0.6.17

Version indicates an expected call of Version.

type SQLLiteV1 added in v0.6.17

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

func (*SQLLiteV1) AfterLoad added in v0.6.17

func (s *SQLLiteV1) AfterLoad(dbStoragePath string) error

func (*SQLLiteV1) IsLoaded added in v0.6.17

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

func (*SQLLiteV1) IsReady added in v0.6.17

func (s *SQLLiteV1) IsReady() bool

func (*SQLLiteV1) Load added in v0.6.17

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

func (*SQLLiteV1) SchemaIDs added in v0.6.17

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

func (*SQLLiteV1) ShouldUpdate added in v0.6.17

func (s *SQLLiteV1) ShouldUpdate(newStorage DBOpenAPILoader) bool

func (*SQLLiteV1) Specification added in v0.6.17

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

func (*SQLLiteV1) SpecificationRaw added in v0.6.17

func (s *SQLLiteV1) SpecificationRaw(schemaID int) interface{}

func (*SQLLiteV1) SpecificationRawContent added in v0.6.17

func (s *SQLLiteV1) SpecificationRawContent(schemaID int) []byte

func (*SQLLiteV1) SpecificationVersion added in v0.6.17

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

func (*SQLLiteV1) Version added in v0.6.17

func (s *SQLLiteV1) Version() int

type SQLLiteV2 added in v0.6.17

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

func (*SQLLiteV2) AfterLoad added in v0.6.17

func (s *SQLLiteV2) AfterLoad(dbStoragePath string) error

func (*SQLLiteV2) IsLoaded added in v0.6.17

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

func (*SQLLiteV2) IsReady added in v0.6.17

func (s *SQLLiteV2) IsReady() bool

func (*SQLLiteV2) Load added in v0.6.17

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

func (*SQLLiteV2) SchemaIDs added in v0.6.17

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

func (*SQLLiteV2) ShouldUpdate added in v0.6.17

func (s *SQLLiteV2) ShouldUpdate(newStorage DBOpenAPILoader) bool

func (*SQLLiteV2) Specification added in v0.6.17

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

func (*SQLLiteV2) SpecificationRaw added in v0.6.17

func (s *SQLLiteV2) SpecificationRaw(schemaID int) interface{}

func (*SQLLiteV2) SpecificationRawContent added in v0.6.17

func (s *SQLLiteV2) SpecificationRawContent(schemaID int) []byte

func (*SQLLiteV2) SpecificationVersion added in v0.6.17

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

func (*SQLLiteV2) Version added in v0.6.17

func (s *SQLLiteV2) Version() int

type SpecificationEntryV1 added in v0.6.17

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

type SpecificationEntryV2 added in v0.6.17

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

Jump to

Keyboard shortcuts

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