apollo

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppInfo

type AppInfo struct {
	Name                       string `json:"name"`
	AppID                      string `json:"appId"`
	OrgID                      string `json:"orgId"`
	OrgName                    string `json:"orgName"`
	OwnerName                  string `json:"ownerName"`
	OwnerEmail                 string `json:"ownerEmail"`
	DataChangeCreatedBy        string `json:"dataChangeCreatedBy"`
	DataChangeLastModifiedBy   string `json:"dataChangeLastModifiedBy"`
	DataChangeCreatedTime      string `json:"dataChangeCreatedTime"`
	DataChangeLastModifiedTime string `json:"dataChangeLastModifiedTime"`
}

type BriefNamespace

type BriefNamespace struct {
	AppID         string `json:"appId"`
	Env           string `json:"env"`
	ClusterName   string `json:"clusterName"`
	NamespaceName string `json:"namespaceName"`
	Format        string `json:"format"`
}

type Client

type Client struct {
	*req.Client
	BaseURL string
}

func NewClient

func NewClient(url, token string) *Client

func (*Client) GetNamespace

func (c *Client) GetNamespace(appID, env, cluster, namespace string) (result *Namespace, err error)

func (*Client) ListApp

func (c *Client) ListApp() (list []*AppInfo, err error)

func (*Client) ListAppEnvsAndClusters

func (c *Client) ListAppEnvsAndClusters(appID string) (envList []*EnvAndCluster, err error)

func (*Client) ListAppNamespace

func (c *Client) ListAppNamespace(appID, env, cluster string) (list []*Namespace, err error)

func (*Client) Release

func (c *Client) Release(appID, env, cluster, namespace string, args *ReleaseArgs) error

func (*Client) UpdateKeyVal

func (c *Client) UpdateKeyVal(appID, env, cluster, namespace, key, val, updateUser string) error

type EnvAndCluster

type EnvAndCluster struct {
	Env      string   `json:"env"`
	Clusters []string `json:"clusters"`
}

type Items

type Items struct {
	Key                        string `json:"key"`
	Value                      string `json:"value"`
	Comment                    string `json:"comment"`
	DataChangeCreatedBy        string `json:"dataChangeCreatedBy"`
	DataChangeLastModifiedBy   string `json:"dataChangeLastModifiedBy"`
	DataChangeCreatedTime      string `json:"dataChangeCreatedTime"`
	DataChangeLastModifiedTime string `json:"dataChangeLastModifiedTime"`
}

type Namespace

type Namespace struct {
	AppID                      string   `json:"appId"`
	ClusterName                string   `json:"clusterName"`
	NamespaceName              string   `json:"namespaceName"`
	Comment                    string   `json:"comment"`
	Format                     string   `json:"format"`
	IsPublic                   bool     `json:"isPublic"`
	Items                      []*Items `json:"items"`
	DataChangeCreatedBy        string   `json:"dataChangeCreatedBy"`
	DataChangeLastModifiedBy   string   `json:"dataChangeLastModifiedBy"`
	DataChangeCreatedTime      string   `json:"dataChangeCreatedTime"`
	DataChangeLastModifiedTime string   `json:"dataChangeLastModifiedTime"`
}

type ReleaseArgs

type ReleaseArgs struct {
	ReleaseTitle   string `json:"releaseTitle"`
	ReleaseComment string `json:"releaseComment"`
	ReleasedBy     string `json:"releasedBy"`
}

Jump to

Keyboard shortcuts

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