goproxy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package goproxy simple client for go modules proxy https://docs.gomods.io/intro/protocol/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the go modules proxy client.

func NewClient

func NewClient(proxyURL string) *Client

NewClient creates a new Client.

func (*Client) GetInfo

func (c *Client) GetInfo(moduleName string, version string) (*VersionInfo, error)

GetInfo gets information about a module version.

<proxy URL>/<module name>/@v/<version>.info

func (*Client) GetLatest

func (c *Client) GetLatest(moduleName string) (*VersionInfo, error)

GetLatest gets information about the latest module version.

<proxy URL>/<module name>/@latest

func (*Client) GetVersions

func (c *Client) GetVersions(moduleName string) ([]string, error)

GetVersions gets all available module versions.

<proxy URL>/<module name>/@v/list

type VersionInfo

type VersionInfo struct {
	Name    string
	Short   string
	Version string
	Time    time.Time
}

VersionInfo is the representation of a version.

Jump to

Keyboard shortcuts

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