client

package
v2.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: Apache-2.0 Imports: 13 Imported by: 2

README

CircleCI Go Report Card

credentiald-client

Go HTTP Rest client for credentiald service.

Development

Dependencies

Dependencies are managed using dep and contained in the vendor directory.

How to build
go build ./client
How to test
go test ./...

How to use it

import "github.com/giantswarm/credentiald-client/client"

For usage examples see: client/client_test.go

License

PROJECT is under the Apache 2.0 license. See the LICENSE file for details.

Documentation

Index

Constants

View Source
const (
	// API endpoints of the service this client action interacts with.
	CredentialEndpoint        = "/v4/organizations/%s/credentials/"
	CredentialDetailsEndpoint = "/v4/organizations/%s/credentials/%s/"

	// Name is the service name being implemented.
	Name = "credentials"
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsInvalidRequest

func IsInvalidRequest(err error) bool

IsInvalidRequest asserts invalidRequestError.

func IsInvalidResponse

func IsInvalidResponse(err error) bool

IsInvalidResponse asserts invalidResponseError.

Types

type Client

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

func New

func New(config Config) (*Client, error)

New creates a new configured credentiald Client.

func (Client) Create

func (c Client) Create(ctx context.Context, request creator.Request) (*creator.Response, error)

func (Client) List

func (c Client) List(ctx context.Context, request lister.Request) ([]lister.Response, error)

func (Client) Search

func (c Client) Search(ctx context.Context, request searcher.Request) (*searcher.Response, error)

type Config

type Config struct {
	Logger     micrologger.Logger
	RestClient *resty.Client

	Address string
}

Config represents the configuration used to create a credentiald Client.

Jump to

Keyboard shortcuts

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