juju: github.com/juju/juju/apiserver/facades/client/charmhub Index | Files

package charmhub

import "github.com/juju/juju/apiserver/facades/client/charmhub"

Index

Package Files

charmhub.go convert.go

type Backend Uses

type Backend interface {
    ModelConfig() (*config.Config, error)
}

Backend defines the state methods this facade needs, so they can be mocked for testing.

type CharmHubAPI Uses

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

CharmHubAPI API provides the CharmHub API facade for version 1.

func NewFacade Uses

func NewFacade(ctx facade.Context) (*CharmHubAPI, error)

NewFacade creates a new CharmHubAPI facade.

func (*CharmHubAPI) Find Uses

func (api *CharmHubAPI) Find(arg params.Query) (params.CharmHubEntityFindResult, error)

Find queries the CharmHub API with a given entity ID.

func (*CharmHubAPI) Info Uses

func (api *CharmHubAPI) Info(arg params.Entity) (params.CharmHubEntityInfoResult, error)

Info queries the CharmHub API with a given entity ID.

type Client Uses

type Client interface {
    URL() string
    Info(ctx context.Context, name string) (transport.InfoResponse, error)
    Find(ctx context.Context, query string) ([]transport.FindResponse, error)
}

Client represents a CharmHub Client for making queries to the CharmHub API.

type ClientFactory Uses

type ClientFactory interface {
    Client(string) (Client, error)
}

ClientFactory defines a factory for creating clients from a given url.

Package charmhub imports 15 packages (graph) and is imported by 2 packages. Updated 2020-09-27. Refresh now. Tools for package owners.