documentation changes
1) modifications to exported functions/variables documentation 2) moved some methods into a different folder Change-Id: I212442516424bde3284f75b326d152c290d20c80
This commit is contained in:
parent
8045109c64
commit
9d4347b0c1
@ -26,7 +26,7 @@ import (
|
||||
// Context is a tuple of references to a cluster (how do I communicate with a kubernetes context),
|
||||
// a user (how do I identify myself), and a namespace (what subset of resources do I want to work with)
|
||||
type Context struct {
|
||||
// Context name in kubeconf
|
||||
// NameInKubeconf is the Context name in kubeconf
|
||||
NameInKubeconf string `json:"contextKubeconf"`
|
||||
|
||||
// Manifest is the default manifest to be use with this context
|
||||
|
@ -39,53 +39,6 @@ type Manifest struct {
|
||||
MetadataPath string `json:"metadataPath"`
|
||||
}
|
||||
|
||||
// Repository is a tuple that holds the information for the remote sources of manifest yaml documents.
|
||||
// Information such as location, authentication info,
|
||||
// as well as details of what to get such as branch, tag, commit it, etc.
|
||||
type Repository struct {
|
||||
// URLString for Repository
|
||||
URLString string `json:"url"`
|
||||
// Auth holds authentication options against remote
|
||||
Auth *RepoAuth `json:"auth,omitempty"`
|
||||
// CheckoutOptions holds options to checkout repository
|
||||
CheckoutOptions *RepoCheckout `json:"checkout,omitempty"`
|
||||
}
|
||||
|
||||
// RepoAuth struct describes method of authentication against given repository
|
||||
type RepoAuth struct {
|
||||
// Type of authentication method to be used with given repository
|
||||
// supported types are "ssh-key", "ssh-pass", "http-basic"
|
||||
Type string `json:"type,omitempty"`
|
||||
//KeyPassword is a password decrypt ssh private key (used with ssh-key auth type)
|
||||
KeyPassword string `json:"keyPass,omitempty"`
|
||||
// KeyPath is path to private ssh key on disk (used with ssh-key auth type)
|
||||
KeyPath string `json:"sshKey,omitempty"`
|
||||
//HTTPPassword is password for basic http authentication (used with http-basic auth type)
|
||||
HTTPPassword string `json:"httpPass,omitempty"`
|
||||
// SSHPassword is password for ssh password authentication (used with ssh-pass)
|
||||
SSHPassword string `json:"sshPass,omitempty"`
|
||||
// Username to authenticate against git remote (used with any type)
|
||||
Username string `json:"username,omitempty"`
|
||||
}
|
||||
|
||||
// RepoCheckout container holds information how to checkout repository
|
||||
// Each field is mutually exclusive
|
||||
type RepoCheckout struct {
|
||||
// CommitHash is full hash of the commit that will be used to checkout
|
||||
CommitHash string `json:"commitHash"`
|
||||
// Branch is the branch name to checkout
|
||||
Branch string `json:"branch"`
|
||||
// Tag is the tag name to checkout
|
||||
Tag string `json:"tag"`
|
||||
// RemoteRef is not supported currently TODO
|
||||
// RemoteRef is used for remote checkouts such as gerrit change requests/github pull request
|
||||
// for example refs/changes/04/691202/5
|
||||
// TODO Add support for fetching remote refs
|
||||
RemoteRef string `json:"remoteRef,omitempty"`
|
||||
// ForceCheckout is a boolean to indicate whether to use the `--force` option when checking out
|
||||
ForceCheckout bool `json:"force"`
|
||||
}
|
||||
|
||||
// Metadata holds entrypoints for phases, inventory and clusterctl
|
||||
type Metadata struct {
|
||||
Inventory *InventoryMeta `json:"inventory,omitempty"`
|
||||
|
@ -35,6 +35,53 @@ const (
|
||||
HTTPBasic = "http-basic"
|
||||
)
|
||||
|
||||
// Repository struct holds the information for the remote sources of manifest yaml documents.
|
||||
// Information such as location, authentication info,
|
||||
// as well as details of what to get such as branch, tag, commit it, etc.
|
||||
type Repository struct {
|
||||
// URLString for Repository
|
||||
URLString string `json:"url"`
|
||||
// Auth holds authentication options against remote
|
||||
Auth *RepoAuth `json:"auth,omitempty"`
|
||||
// CheckoutOptions holds options to checkout repository
|
||||
CheckoutOptions *RepoCheckout `json:"checkout,omitempty"`
|
||||
}
|
||||
|
||||
// RepoAuth struct describes method of authentication against given repository
|
||||
type RepoAuth struct {
|
||||
// Type of authentication method to be used with given repository
|
||||
// supported types are "ssh-key", "ssh-pass", "http-basic"
|
||||
Type string `json:"type,omitempty"`
|
||||
//KeyPassword is a password decrypt ssh private key (used with ssh-key auth type)
|
||||
KeyPassword string `json:"keyPass,omitempty"`
|
||||
// KeyPath is path to private ssh key on disk (used with ssh-key auth type)
|
||||
KeyPath string `json:"sshKey,omitempty"`
|
||||
//HTTPPassword is password for basic http authentication (used with http-basic auth type)
|
||||
HTTPPassword string `json:"httpPass,omitempty"`
|
||||
// SSHPassword is password for ssh password authentication (used with ssh-pass)
|
||||
SSHPassword string `json:"sshPass,omitempty"`
|
||||
// Username to authenticate against git remote (used with any type)
|
||||
Username string `json:"username,omitempty"`
|
||||
}
|
||||
|
||||
// RepoCheckout container holds information how to checkout repository
|
||||
// Each field is mutually exclusive
|
||||
type RepoCheckout struct {
|
||||
// CommitHash is full hash of the commit that will be used to checkout
|
||||
CommitHash string `json:"commitHash"`
|
||||
// Branch is the branch name to checkout
|
||||
Branch string `json:"branch"`
|
||||
// Tag is the tag name to checkout
|
||||
Tag string `json:"tag"`
|
||||
// RemoteRef is not supported currently TODO
|
||||
// RemoteRef is used for remote checkouts such as gerrit change requests/github pull request
|
||||
// for example refs/changes/04/691202/5
|
||||
// TODO Add support for fetching remote refs
|
||||
RemoteRef string `json:"remoteRef,omitempty"`
|
||||
// ForceCheckout is a boolean to indicate whether to use the `--force` option when checking out
|
||||
ForceCheckout bool `json:"force"`
|
||||
}
|
||||
|
||||
// RepoCheckout methods
|
||||
|
||||
func (c *RepoCheckout) String() string {
|
||||
|
@ -26,6 +26,7 @@ import (
|
||||
// is raised if JSON path element points to a wrong data structure e.g.
|
||||
// JSON path 'a.b[x=y]c' considers that there is a list of maps under key 'b'
|
||||
// therefore ErrTypeMismatch will be returned for following structure
|
||||
//
|
||||
// a:
|
||||
// b:
|
||||
// - 'some string'
|
||||
|
Loading…
Reference in New Issue
Block a user