storage

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MPL-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package storage 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) (bool, 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(dbStoragePath string, version int) (DBOpenAPILoader, error)

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

func NewOpenAPIDBV1

func NewOpenAPIDBV1(dbStoragePath string) (DBOpenAPILoader, error)

func NewOpenAPIDBV2

func NewOpenAPIDBV2(dbStoragePath string) (DBOpenAPILoader, error)

func NewOpenAPIFromFile

func NewOpenAPIFromFile(OASPath string) (DBOpenAPILoader, error)

func NewOpenAPIFromFileOrURL

func NewOpenAPIFromFileOrURL(specPath string, header *config.CustomHeader) (DBOpenAPILoader, error)

NewOpenAPIFromFileOrURL loads OAS specs from the file or URL and returns the struct with the parsed specs

func NewOpenAPIFromURL

func NewOpenAPIFromURL(url string, customHeader *config.CustomHeader) (DBOpenAPILoader, error)

type File

type File struct {
	RawSpec     string
	LastUpdate  time.Time
	OpenAPISpec *openapi3.T
	// contains filtered or unexported fields
}

func (*File) AfterLoad

func (s *File) AfterLoad(_ string) error

func (*File) IsLoaded

func (s *File) IsLoaded(_ int) bool

func (*File) IsReady

func (s *File) IsReady() bool

func (*File) Load

func (f *File) Load(OASPath string) (bool, error)

func (*File) SchemaIDs

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

func (*File) ShouldUpdate

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

func (*File) Specification

func (s *File) Specification(_ int) *openapi3.T

func (*File) SpecificationRaw

func (s *File) SpecificationRaw(_ int) interface{}

func (*File) SpecificationRawContent

func (s *File) SpecificationRawContent(_ int) []byte

func (*File) SpecificationVersion

func (s *File) SpecificationVersion(_ int) string

func (*File) Version

func (s *File) Version() int

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

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

func (m *MockDBOpenAPILoader) IsReady() bool

IsReady mocks base method.

func (*MockDBOpenAPILoader) Load

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

Load mocks base method.

func (*MockDBOpenAPILoader) SchemaIDs

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

SchemaIDs mocks base method.

func (*MockDBOpenAPILoader) ShouldUpdate

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

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

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

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

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

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

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

Version indicates an expected call of Version.

type SQLLiteV1

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

func (*SQLLiteV1) AfterLoad

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

func (*SQLLiteV1) IsLoaded

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

func (*SQLLiteV1) IsReady

func (s *SQLLiteV1) IsReady() bool

func (*SQLLiteV1) Load

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

func (*SQLLiteV1) SchemaIDs

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

func (*SQLLiteV1) ShouldUpdate

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

func (*SQLLiteV1) Specification

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

func (*SQLLiteV1) SpecificationRaw

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

func (*SQLLiteV1) SpecificationRawContent

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

func (*SQLLiteV1) SpecificationVersion

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

func (*SQLLiteV1) Version

func (s *SQLLiteV1) Version() int

type SQLLiteV2

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

func (*SQLLiteV2) AfterLoad

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

func (*SQLLiteV2) IsLoaded

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

func (*SQLLiteV2) IsReady

func (s *SQLLiteV2) IsReady() bool

func (*SQLLiteV2) Load

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

func (*SQLLiteV2) SchemaIDs

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

func (*SQLLiteV2) ShouldUpdate

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

func (*SQLLiteV2) Specification

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

func (*SQLLiteV2) SpecificationRaw

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

func (*SQLLiteV2) SpecificationRawContent

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

func (*SQLLiteV2) SpecificationVersion

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

func (*SQLLiteV2) Version

func (s *SQLLiteV2) Version() int

type SpecificationEntryV1

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

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"`
}

type URL

type URL struct {
	RawSpec     string
	LastUpdate  time.Time
	OpenAPISpec *openapi3.T
	// contains filtered or unexported fields
}

func (*URL) AfterLoad

func (u *URL) AfterLoad(_ string) error

func (*URL) IsLoaded

func (u *URL) IsLoaded(_ int) bool

func (*URL) IsReady

func (u *URL) IsReady() bool

func (*URL) Load

func (u *URL) Load(url string) (bool, error)

func (*URL) SchemaIDs

func (u *URL) SchemaIDs() []int

func (*URL) ShouldUpdate

func (u *URL) ShouldUpdate(newStorage DBOpenAPILoader) bool

func (*URL) Specification

func (u *URL) Specification(_ int) *openapi3.T

func (*URL) SpecificationRaw

func (u *URL) SpecificationRaw(_ int) interface{}

func (*URL) SpecificationRawContent

func (u *URL) SpecificationRawContent(_ int) []byte

func (*URL) SpecificationVersion

func (u *URL) SpecificationVersion(_ int) string

func (*URL) Version

func (u *URL) Version() int

Directories

Path Synopsis
Package updater is a generated GoMock package.
Package updater is a generated GoMock package.

Jump to

Keyboard shortcuts

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