apigee

package module
v0.0.0-...-223876d Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

README

Apigee Edge client library

Go Reference Go Report Card GitHub release (latest SemVer including pre-releases)

A Go library for Google Apigee Edge to create and delete credentials (consumer key and consumer secret) and add API products to credentials.

Prerequisites

Git: Clone Repo

git clone https://github.com/bstraehle/apigee-edge-client-go.git
cd apigee-edge-client-go

Go: Build / Test

export GOOS=linux
export GOARCH=amd64

# export APIGEE_IS_MOCK=1
export APIGEE_HOST=<APIGEE_HOST>
export APIGEE_USERNAME=<APIGEE_USERNAME>
export APIGEE_PASSWORD=<APIGEE_PASSWORD>
export APIGEE_ORG_NAME=<APIGEE_ORG_NAME>
export APIGEE_DEVELOPER_EMAIL=<APIGEE_DEVELOPER_EMAIL>
export APIGEE_APP_NAME=<APIGEE_APP_NAME>
export APIGEE_API_PRODUCTS=<APIGEE_API_PRODUCTS>

go build client.go credentials.go credentials_test.go
go test -v

Documentation

Index

Constants

View Source
const Host string = "https://apigee.googleapis.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	HTTPClient *http.Client
	Host       string
	Username   string
	Password   string
}

func NewClient

func NewClient(host, username string, password string) (*Client, error)

func (*Client) CreateCredentials

func (c *Client) CreateCredentials(orgName string, developerEmail string, appName string, apiProducts string, expiresInSeconds int) (*CreateCredentialsResponse, error)

func (*Client) DeleteCredentials

func (c *Client) DeleteCredentials(orgName string, developerEmail string, appName string, key string) error

type CreateCredentialsResponse

type CreateCredentialsResponse struct {
	Key         string `json:"key"`
	Secret      string `json:"secret"`
	Credentials string `json:"credentials"`
}

Jump to

Keyboard shortcuts

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