client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package client provides a rest client to talk to the Trusty API.

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = Options{
	HttpClient: &http.Client{},
	BaseURL:    defaultEndpoint,
}

DefaultOptions is the default Trusty client options set

Functions

This section is empty.

Types

type Options

type Options struct {
	HttpClient netClient
	BaseURL    string
}

Options configures the Trusty API client

type Trusty

type Trusty struct {
	Options Options
}

Trusty is the main trusty client

func New

func New() *Trusty

New returns a new Trusty REST client

func NewWithOptions

func NewWithOptions(opts Options) *Trusty

NewWithOptions returns a new client with the dspecified options set

func (*Trusty) Report

func (t *Trusty) Report(ctx context.Context, dep *types.Dependency) (*types.Reply, error)

Report returns a dependency report with all the data that Trust has available for a package

Jump to

Keyboard shortcuts

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