database

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PersistanceAdapter

type PersistanceAdapter struct {
	RequestRepository  RequestRepository
	ResponseRepository ResponseRepository
}

func NewPersistanceAdapter

func NewPersistanceAdapter() (PersistanceAdapter, error)

Only sqlite for now

type RequestRepository

type RequestRepository interface {
	GetRequests() []*types.Request
	CreateRequest(name string) *types.Request
	UpdateRequest(r *types.Request)
	DeleteRequest(id int64)
}

type ResponseRepository

type ResponseRepository interface {
	GetAll() map[int64][]*types.Response
	Save(r *types.Response) *types.Response
}

type SqliteRequestRepository

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

func (SqliteRequestRepository) CreateRequest

func (a SqliteRequestRepository) CreateRequest(name string) *types.Request

func (SqliteRequestRepository) DeleteRequest

func (a SqliteRequestRepository) DeleteRequest(id int64)

func (SqliteRequestRepository) GetRequests

func (a SqliteRequestRepository) GetRequests() []*types.Request

func (SqliteRequestRepository) UpdateRequest

func (a SqliteRequestRepository) UpdateRequest(r *types.Request)

type SqliteResponseRepository

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

func (SqliteResponseRepository) GetAll

func (ssr SqliteResponseRepository) GetAll() map[int64][]*types.Response

func (SqliteResponseRepository) Save

func (ssr SqliteResponseRepository) Save(response *types.Response) *types.Response

Jump to

Keyboard shortcuts

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