api

package
v1.5.63 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package api encapsulates convenience functionality for interacting with well known APIs and related authentication mechanisms

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvVarTokenProvider

type EnvVarTokenProvider struct {
	EnvvarNames []string
}

EnvVarTokenProvider takes names of env vars, that could hold string tokens

func (*EnvVarTokenProvider) Parse

func (p *EnvVarTokenProvider) Parse() (string, error)

Parse retrieves string tokens from env vars

type HTTPClient

type HTTPClient interface{}

HTTPClient is used here instead of *http.Client Casting can be considered as safe

type StringToken

type StringToken string

StringToken is a string that behaves like a StringTokenProvider

func (StringToken) Parse

func (s StringToken) Parse() (string, error)

Parse returns the string representation of the underlying type

type StringTokenProvider

type StringTokenProvider TokenProvider[string]

StringTokenProvider will provide string tokens to be processed by the TokenProvider

type TokenProvider

type TokenProvider[P any] interface {
	Parse() (P, error)
}

TokenProvider will provide the tokens to be processed by the TokenProvider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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