searcher

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Endpoint = "/v1/releases/%s/"
	Name     = "release/searcher"
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

Types

type Config

type Config struct {
	Logger     micrologger.Logger
	RestClient *resty.Client

	URL *url.URL
}

func DefaultConfig

func DefaultConfig() Config

type Request

type Request struct {
	ReleaseVersion string `json:"release_version"`
}

func DefaultRequest

func DefaultRequest() Request

type Response

type Response struct {
	Active         bool                   `json:"active"`
	Apps           []versionbundle.App    `json:"apps"`
	ReleaseVersion string                 `json:"release_version"`
	VersionBundles []versionbundle.Bundle `json:"version_bundles"`
}

func DefaultResponse

func DefaultResponse() Response

type Searcher

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

func New

func New(config Config) (*Searcher, error)

func (*Searcher) Search

func (s *Searcher) Search(ctx context.Context, request Request) (Response, error)

Jump to

Keyboard shortcuts

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