apiutils

package
Version: v1.82.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package apiutils contains various utilities to interact with Aporeto meta APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(ctx context.Context, api string, tlsConfig *tls.Config) (map[string]string, error)

GetConfig returns the additional config exposed by the gateway.

func GetGoogleOAuthClientID

func GetGoogleOAuthClientID(ctx context.Context, api string, tlsConfig *tls.Config) ([]byte, error)

GetGoogleOAuthClientID returns the Google oauth client ID used bby the platform.

func GetJWTCert

func GetJWTCert(ctx context.Context, api string, tlsConfig *tls.Config) ([]byte, error)

GetJWTCert returns the public certificate used to sign jwt.

func GetJWTX509Cert

func GetJWTX509Cert(ctx context.Context, api string, tlsConfig *tls.Config) (*x509.Certificate, error)

GetJWTX509Cert returns the public certificate used to sign jwt as an *x509.Certificate.

func GetManifestURL

func GetManifestURL(ctx context.Context, api string, tlsConfig *tls.Config) ([]byte, error)

GetManifestURL returns the url of the manifest.

func GetPublicCA

func GetPublicCA(ctx context.Context, api string, tlsConfig *tls.Config) ([]byte, error)

GetPublicCA returns the public CA used by the api.

func GetPublicCAPool

func GetPublicCAPool(ctx context.Context, api string, tlsConfig *tls.Config) (*x509.CertPool, error)

GetPublicCAPool returns the public CA used by the api as a *x509.CertPool.

func GetServiceVersions

func GetServiceVersions(ctx context.Context, api string, tlsConfig *tls.Config) (map[string]Version, error)

GetServiceVersions returns the version of the services.

func GetTime added in v1.81.0

func GetTime(ctx context.Context, api string, tlsConfig *tls.Config) (time.Time, error)

GetTime returns the current time from the api server.

Types

type Version

type Version struct {
	Version string
	Sha     string
}

Version holds the version of a servie

func GetModelVersion

func GetModelVersion(ctx context.Context, api string, tlsConfig *tls.Config) (*Version, error)

GetModelVersion returns the version of the services.

Source Files

Jump to

Keyboard shortcuts

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