systemconfig

package
v1.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	GitLabProvider  = "gitlab"
	GitHubProvider  = "github"
	GerritProvider  = "gerrit"
	CodeHubProvider = "codehub"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*httpclient.Client
	// contains filtered or unexported fields
}

func New

func New() *Client

func (*Client) GetCodeHost

func (c *Client) GetCodeHost(id int) (*CodeHost, error)

func (*Client) GetCodeHostByAddressAndOwner

func (c *Client) GetCodeHostByAddressAndOwner(address, owner, source string) (*CodeHost, error)

func (*Client) GetEmailHost

func (c *Client) GetEmailHost() (*Email, error)

func (*Client) GetJiraInfo

func (c *Client) GetJiraInfo() (*JiraInfo, error)

func (*Client) GetLDAPConnector

func (c *Client) GetLDAPConnector(id string) (*Connector, error)

func (*Client) ListCodeHosts

func (c *Client) ListCodeHosts() ([]*CodeHost, error)

func (*Client) ListConnectors

func (c *Client) ListConnectors() ([]*Connector, error)

type CodeHost

type CodeHost struct {
	ID          int    `json:"id"`
	Address     string `json:"address"`
	Type        string `json:"type"`
	AccessToken string `json:"accessToken"`
	Namespace   string `json:"namespace"`
	Region      string `json:"region"`
	AccessKey   string `json:"applicationId"`
	SecretKey   string `json:"clientSecret"`
	Username    string `json:"username"`
	Password    string `json:"password"`
}

func GetCodeHostInfo

func GetCodeHostInfo(opt *Option) (*CodeHost, error)

type Connector

type Connector struct {
	Type   string      `json:"type"`
	ID     string      `json:"id"`
	Name   string      `json:"name"`
	Config interface{} `json:"config"`
}

type Email

type Email struct {
	Name     string `json:"name"`
	Port     int    `json:"port"`
	UserName string `json:"username"`
	Password string `json:"password"`
}

type JiraInfo

type JiraInfo struct {
	ID             int64  `json:"id"`
	Host           string `json:"host"`
	User           string `json:"user"`
	AccessToken    string `json:"access_token"`
	OrganizationID int    `json:"organizationId"`
	CreatedAt      int64  `json:"created_at"`
	UpdatedAt      int64  `json:"updated_at"`
}

type Option

type Option struct {
	CodeHostType string
	Address      string
	Namespace    string
	CodeHostID   int
}

Jump to

Keyboard shortcuts

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