netapi

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2018 License: MIT Imports: 11 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 {
	GetKeys(user string) ([]ssh.Key, error)
}

A Client is used to acquire keys from an API service like github/gitlab (public or internal).

func NewGithubClient

func NewGithubClient(options Optioner) Client

NewGithubClient creates a Client that can be used to communicate with the github API.

func NewGitlabClient

func NewGitlabClient(options Optioner) Client

type Optioner

type Optioner interface {
	Options() *Options
}

An Optioner returns some Options.

type Options

type Options struct {
	URL   string `json:"url"`
	Token string `json:"token"`
}

Options represents configuration parameters available for reaching API services like github and gitlab.

Directories

Path Synopsis
Package netapitest contains autogenerated mocks.
Package netapitest contains autogenerated mocks.

Jump to

Keyboard shortcuts

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