Documentation
¶
Index ¶
- func GetAccount(hostname, accessToken string) (types.Account, error)
- type Account
- type AccountSerializer
- func (as AccountSerializer) GetCreatedAt() *string
- func (as AccountSerializer) GetEmail() *string
- func (as AccountSerializer) GetFollowerCount() *int
- func (as AccountSerializer) GetIsAdmin() *bool
- func (as AccountSerializer) GetLastSeen() *string
- func (as AccountSerializer) GetLink() *string
- func (as AccountSerializer) GetName() *string
- func (as AccountSerializer) GetProjectCount() *int
- func (as AccountSerializer) GetUsername() *string
- type Accounts
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
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 (AccountSerializer) GetLink ¶
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 ¶
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 ¶
GetSanitized returns a copy of this Config instance without sensitive credentials
Click to show internal directories.
Click to hide internal directories.