pypi

package
v2.11.0-3 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ListVersions(ctx context.Context, crate string) ([]string, error)
	GetLatestVersion(ctx context.Context, crate string) (string, error)
}

type ClientImpl

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

func NewClientImpl

func NewClientImpl(client *http.Client) *ClientImpl

func (*ClientImpl) GetLatestVersion

func (searcher *ClientImpl) GetLatestVersion(ctx context.Context, crate string) (string, error)

func (*ClientImpl) ListVersions

func (searcher *ClientImpl) ListVersions(ctx context.Context, pkgName string) ([]string, error)

type MockClient

type MockClient struct {
	Versions []string
	Err      error
}

func (*MockClient) GetLatestVersion

func (mock *MockClient) GetLatestVersion(ctx context.Context, crate string) (string, error)

func (*MockClient) ListVersions

func (mock *MockClient) ListVersions(ctx context.Context, crate string) ([]string, error)

type Payload

type Payload struct {
	Releases map[string]interface{} `json:"releases"`
}

type PayloadVersion

type PayloadVersion struct {
	Num string `json:"num"`
}

Jump to

Keyboard shortcuts

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