Categorygithub.com/TykTechnologies/portal-go
repositorypackage
0.0.0-20231206083140-fadb62f1b854
Repository: https://github.com/tyktechnologies/portal-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Portal Client for Go

A Go client for the Tyk Enterprise Dev Portal API

Build Status GoDoc Go Report Card

Installation

go get github.com/TykTechnologies/portal-go

Usage

This library is a Go client you can use to interact with the Tyk Enterprise Dev Portal API. Here are some examples.

package main

import (
    "context"
    "fmt"
    "os"
    "strconv"

    "github.com/TykTechnologies/portal-go"
)

func main() {
    // new client
    client, err := portal.New(
        portal.WithBaseURL(os.Getenv("PORTAL_URL")),
        portal.WithToken(os.Getenv("PORTAL_TOKEN")),
    )

    // list organisations
    portal, err := client.Orgs().ListOrgs(context.Background())
    if err != nil {
        fmt.Printf("returned error: %v\n", err)
        os.Exit(1)
    }
}

Contributing

For instructions about contributing and testing, visit the CONTRIBUTING file.