gitlab

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccount

func GetAccount(hostname, accessToken string) (types.Account, error)

Types

type Account

type Account struct {
	// Name is the user-defined label for this account
	Name string `json:"name" yaml:"name"`
	// Description is a user-defined description of what this account is for
	Description string `json:"description" yaml:"description"`
	// Hostname is the hostname of the Gitlab installation. If this is not provided
	// this should default to "gitlab.com"
	Hostname string `json:"hostname" yaml:"hostname"`
	// AccessToken is your Gitlab Personal Access Token which can be generated
	// from this page at https://gitlab.com/profile/personal_access_tokens
	//
	// The required Scopes are as follows:
	// - read_user
	// - read_api
	// - read_repository
	// - read_registry
	AccessToken string `json:"accessToken" yaml:"accessToken"`
	// Public indicates whether this account should be public, if so, the /platforms
	// endpoint on the dev server will expose this account; this is done to accomodate
	// using both personal and work accounts, note that even if this is set to true,
	// the AccessToken should not be exposed
	Public bool `json:"public" yaml:"public"`
}

Account defines the configuration structure for a logical Gitlab account to be consumed

func (Account) GetSanitized

func (a Account) GetSanitized() Account

GetSanitized returns a copy of this Account instance without sensitive credentials

type AccountSerializer

type AccountSerializer struct {
	// contains filtered or unexported fields
}

func (AccountSerializer) GetCreatedAt

func (as AccountSerializer) GetCreatedAt() *string

func (AccountSerializer) GetEmail

func (as AccountSerializer) GetEmail() *string

func (AccountSerializer) GetFollowerCount

func (as AccountSerializer) GetFollowerCount() *int

func (AccountSerializer) GetIsAdmin

func (as AccountSerializer) GetIsAdmin() *bool

func (AccountSerializer) GetLastSeen

func (as AccountSerializer) GetLastSeen() *string
func (as AccountSerializer) GetLink() *string

func (AccountSerializer) GetName

func (as AccountSerializer) GetName() *string

func (AccountSerializer) GetProjectCount

func (as AccountSerializer) GetProjectCount() *int

func (AccountSerializer) GetUsername

func (as AccountSerializer) GetUsername() *string

type Accounts

type Accounts []Account

Accounts defines a list of Account instances which can be operated on internally

func (Accounts) GetSanitized

func (a Accounts) GetSanitized() []Account

GetSanitized returns a copy of this Accounts instance without sensitive credentials

type Config

type Config struct {
	Accounts Accounts `json:"accounts" yaml:"accounts"`
}

Config defines the structure of the configuration for the Gitlab integration

func (Config) GetSanitized

func (c Config) GetSanitized() Config

GetSanitized returns a copy of this Config instance without sensitive credentials

Jump to

Keyboard shortcuts

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