ops

package
v0.0.0-...-806114d Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package ops provides a set of tools for managing, developing, and testing Tyk APIs and Gateways.

Index

Constants

This section is empty.

Variables

View Source
var (
	Environments map[string]*Environment
)

Functions

This section is empty.

Types

type DashboardAdmin

type DashboardAdmin struct {
	Server
	Client *resty.Client
}

func (*DashboardAdmin) GetOrganizations

func (s *DashboardAdmin) GetOrganizations() (*[]Organization, error)

GetOrganizations will get a list of organizations from the Tyk instance.

func (*DashboardAdmin) SSO

func (s *DashboardAdmin) SSO(section string, orgId string, email string, groupId string) (string, error)

SSO allows you to generate a temporary authentication URL, valid for 60 seconds. section can be either "dashboard" or "portal"

type Environment

type Environment struct {
	// Name is the name of the environment.
	Name      string `mapstructure:"name" json:"name"`
	Dashboard Server `mapstructure:"dashboard" json:"dashboard"`
	Gateway   Server `mapstructure:"gateway" json:"gateway"`
	Mserv     Server `mapstructure:"mserv" json:"mserv"`
}

Environment is the configuration for a Tyk environment.

type Organization

type Organization struct {
	Id             string        `json:"id"`
	OwnerName      string        `json:"owner_name"`
	OwnerSlug      string        `json:"owner_slug"`
	CnameEnabled   bool          `json:"cname_enabled"`
	Cname          string        `json:"cname"`
	Apis           []interface{} `json:"apis"`
	SsoEnabled     bool          `json:"sso_enabled"`
	DeveloperQuota int           `json:"developer_quota"`
	DeveloperCount int           `json:"developer_count"`
	EventOptions   struct {
	} `json:"event_options"`
	HybridEnabled bool `json:"hybrid_enabled"`
	Ui            struct {
		Languages struct {
		} `json:"languages"`
		HideHelp    bool   `json:"hide_help"`
		DefaultLang string `json:"default_lang"`
		LoginPage   struct {
		} `json:"login_page"`
		Nav struct {
		} `json:"nav"`
		Uptime struct {
		} `json:"uptime"`
		PortalSection struct {
		} `json:"portal_section"`
		Designer struct {
		} `json:"designer"`
		DontShowAdminSockets           bool `json:"dont_show_admin_sockets"`
		DontAllowLicenseManagement     bool `json:"dont_allow_license_management"`
		DontAllowLicenseManagementView bool `json:"dont_allow_license_management_view"`
		Cloud                          bool `json:"cloud"`
		Dev                            bool `json:"dev"`
	} `json:"ui"`
	OrgOptionsMeta struct {
	} `json:"org_options_meta"`
	OpenPolicy struct {
		Rules   string `json:"rules"`
		Enabled bool   `json:"enabled"`
	} `json:"open_policy"`
	AdditionalPermissions struct {
	} `json:"additional_permissions"`
}

type Server

type Server struct {
	// Type is the type of server (e.g. "dashboard", "gateway", "mserv").
	Type string `mapstructure:"type" json:"type"`
	// Url is the URL of the server.
	Url string `mapstructure:"url" json:"url"`
	// Secret is the secret used to authenticate with the server.
	Secret string `mapstructure:"secret" json:"-"`
	// AllowInsecure is a flag that indicates whether or not to allow insecure connections.
	AllowInsecure bool `mapstructure:"insecure" json:"insecure,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳