Documentation ¶
Index ¶
- type BoolQuery
- type BoolQueryParams
- type Controller
- type EsRepository
- func (esRepo *EsRepository) FindById(ctx context.Context, driveId string) (*SSD, error)
- func (esRepo *EsRepository) Insert(ctx context.Context, ssd SSD) error
- func (esRepo *EsRepository) Search(ctx context.Context, searchQuery string) ([]SSD, error)
- func (esRepo *EsRepository) SearchBasic(ctx context.Context, s string) ([]SSDBasic, error)
- func (esRepo *EsRepository) Update(ctx context.Context, ssd SSD) error
- type Flash
- type Repository
- type SSD
- type SSDBasic
- type TpuRepository
- func (tpu *TpuRepository) FindById(ctx context.Context, id string) (*SSD, error)
- func (tpu *TpuRepository) Insert(ctx context.Context, ssd SSD) error
- func (tpu *TpuRepository) Search(ctx context.Context, s string) ([]SSD, error)
- func (tpu *TpuRepository) SearchBasic(ctx context.Context, s string) ([]SSDBasic, error)
- func (tpu *TpuRepository) Update(ctx context.Context, ssd SSD) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoolQuery ¶
type BoolQuery struct {
Bool BoolQueryParams `json:"bool"`
}
BoolQuery Elastic bool query
type BoolQueryParams ¶
type BoolQueryParams struct { Must []interface{} `json:"must,omitempty"` Should []interface{} `json:"should,omitempty"` Filter []interface{} `json:"filter,omitempty"` MinimumShouldMatch int `json:"minimum_should_match,omitempty"` }
BoolQueryParams params for an Elastic bool query
type Controller ¶
type EsRepository ¶
type EsRepository struct { EsClient *elasticsearch.Client Index string }
func NewEsRepository ¶
func NewEsRepository(esClient *elasticsearch.Client, index string) *EsRepository
func (*EsRepository) Insert ¶
func (esRepo *EsRepository) Insert(ctx context.Context, ssd SSD) error
func (*EsRepository) SearchBasic ¶
type Repository ¶
type SSD ¶
type SSD struct { DriveID string `json:"driveId"` URL string `json:"url"` Manufacturer string `json:"mfgr"` Name string `json:"name"` Capacity string `json:"capacity"` FormFactor string `json:"formFactor"` Interface string `json:"interface"` Protocol string `json:"protocol"` Dram string `json:"dram"` Hmb string `json:"hmb"` Released string `json:"released"` Endurance string `json:"endurance"` Warranty string `json:"warranty"` SeqRead string `json:"seqRead"` SeqWrite string `json:"seqWrite"` Controller Controller `json:"controller"` Flash Flash `json:"flash"` }
func (SSD) ToMarkdown ¶
ToMarkdown converts SSD to Markdown format to support formatting in a reddit comment submission
type TpuRepository ¶
type TpuRepository struct {
// contains filtered or unexported fields
}
func NewTpuRepository ¶
func NewTpuRepository(host, username, apiKey string) *TpuRepository
func (*TpuRepository) SearchBasic ¶
Click to show internal directories.
Click to hide internal directories.