Versions in this module Expand all Collapse all v1 v1.4.4 Dec 21, 2016 v1.4.3 Dec 14, 2016 v1.4.2 Dec 13, 2016 v1.4.1 Oct 10, 2016 v1.4.0 Oct 2, 2016 Changes in this version + const CertificateId_CA + const SecretNameSSHPrimary + const SecretTypeKeypair + const SecretTypeSSHPublicKey + const SecretTypeSecret + func Bool(v bool) *bool + func BoolValue(v *bool) bool + func BuildChanges(a, e, changes interface{}) bool + func BuildTimestampString() string + func CannotChangeField(key string) error + func CopyResource(dest io.Writer, r Resource) (int64, error) + func DebugAsJsonString(v interface{}) string + func DebugAsJsonStringIndent(v interface{}) string + func DebugPrint(o interface{}) string + func DefaultDeltaRunMethod(e Task, c *Context) error + func DownloadURL(url string, dest string, hash *hashing.Hash) (*hashing.Hash, error) + func EnsureFileMode(destPath string, fileMode os.FileMode) (bool, error) + func EnsureFileOwner(destPath string, owner string, groupName string) (bool, error) + func FileModeToString(mode os.FileMode) string + func FindTaskDependencies(tasks map[string]Task) map[string][]string + func IdForTask(taskMap map[string]Task, t Task) string + func Int(v int) *int + func Int64(v int64) *int64 + func Int64Value(v *int64) int64 + func IntValue(v *int) int + func IsNilOrEmpty(s *string) bool + func ParseFileMode(s string, defaultMode os.FileMode) (os.FileMode, error) + func RequiredField(key string) error + func ResourceAsBytes(r Resource) ([]byte, error) + func ResourceAsString(r Resource) (string, error) + func ResourcesMatch(a, b Resource) (bool, error) + func SafeClose(r io.Reader) + func String(s string) *string + func StringValue(s *string) string + func TaskAsString(t Task) string + func Uint64Value(v *uint64) uint64 + func ValueAsString(value reflect.Value) string + func WriteFile(destPath string, contents Resource, fileMode os.FileMode, dirMode os.FileMode) error + type AssetStore struct + func NewAssetStore(cacheDir string) *AssetStore + func (a *AssetStore) Add(id string) error + func (a *AssetStore) Find(key string, assetPath string) (Resource, error) + type BytesResource struct + func NewBytesResource(data []byte) *BytesResource + func (r *BytesResource) Open() (io.Reader, error) + type CAStore interface + AddCert func(name string, cert *Certificate) error + AddSSHPublicKey func(name string, data []byte) error + Cert func(name string) (*Certificate, error) + CertificatePool func(name string) (*CertificatePool, error) + CreateKeypair func(name string, template *x509.Certificate) (*Certificate, *PrivateKey, error) + DeleteSecret func(item *KeystoreItem) error + FindCert func(name string) (*Certificate, error) + FindPrivateKey func(name string) (*PrivateKey, error) + FindSSHPublicKeys func(name string) ([]*KeystoreItem, error) + List func() ([]*KeystoreItem, error) + PrivateKey func(name string) (*PrivateKey, error) + VFSPath func() vfs.Path + func NewVFSCAStore(basedir vfs.Path) CAStore + type Certificate struct + Certificate *x509.Certificate + IsCA bool + PublicKey crypto.PublicKey + Subject pkix.Name + func LoadPEMCertificate(pemData []byte) (*Certificate, error) + func SignNewCertificate(privateKey *PrivateKey, template *x509.Certificate, signer *x509.Certificate, ...) (*Certificate, error) + func (c *Certificate) AsString() (string, error) + func (c *Certificate) MarshalJSON() ([]byte, error) + func (c *Certificate) UnmarshalJSON(b []byte) error + func (c *Certificate) WriteTo(w io.Writer) (int64, error) + type CertificatePool struct + Primary *Certificate + Secondary []*Certificate + func (c *CertificatePool) AsString() (string, error) + type Cloud interface + DNS func() (dnsprovider.Interface, error) + FindDNSHostedZone func(dnsName string) (string, error) + ProviderID func() CloudProviderID + type CloudProviderID string + const CloudProviderAWS + const CloudProviderGCE + func GuessCloudForZone(zone string) (CloudProviderID, bool) + type CompareWithID interface + CompareWithID func() *string + type Context struct + CAStore CAStore + CheckExisting bool + Cloud Cloud + ClusterConfigBase vfs.Path + SecretStore SecretStore + Target Target + Tmpdir string + func NewContext(target Target, cloud Cloud, castore CAStore, secretStore SecretStore, ...) (*Context, error) + func (c *Context) AllTasks() map[string]Task + func (c *Context) Close() + func (c *Context) NewTempDir(prefix string) (string, error) + func (c *Context) Render(a, e, changes Task) error + func (c *Context) RunTasks(maxAttemptsWithNoProgress int) error + type Deletion interface + Delete func(target Target) error + Item func() string + TaskName func() string + type DryRunTarget struct + func NewDryRunTarget(out io.Writer) *DryRunTarget + func (t *DryRunTarget) Delete(deletion Deletion) error + func (t *DryRunTarget) Finish(taskMap map[string]Task) error + func (t *DryRunTarget) HasChanges() bool + func (t *DryRunTarget) PrintReport(taskMap map[string]Task, out io.Writer) error + func (t *DryRunTarget) Render(a, e, changes Task) error + type FileResource struct + Path string + func NewFileResource(path string) *FileResource + func (r *FileResource) Open() (io.Reader, error) + type Group struct + Gid int + Name string + func LookupGroup(name string) (*Group, error) + func LookupGroupById(gid int) (*Group, error) + type HasAddress interface + FindAddress func(context *Context) (*string, error) + type HasCheckExisting interface + CheckExisting func(c *Context) bool + type HasDependencies interface + GetDependencies func(tasks map[string]Task) []Task + type HasName interface + GetName func() *string + SetName func(name string) + type HasSource interface + GetSource func() *Source + type KeystoreItem struct + Data []byte + Id string + Name string + Type string + type PrivateKey struct + Key crypto.PrivateKey + func ParsePEMPrivateKey(data []byte) (*PrivateKey, error) + func (c *PrivateKey) AsString() (string, error) + func (k *PrivateKey) MarshalJSON() ([]byte, error) + func (k *PrivateKey) UnmarshalJSON(b []byte) (err error) + func (k *PrivateKey) WriteTo(w io.Writer) (int64, error) + type ProducesDeletions interface + FindDeletions func(*Context) ([]Deletion, error) + type Resource interface + Open func() (io.Reader, error) + type ResourceHolder struct + Name string + Resource Resource + func WrapResource(r Resource) *ResourceHolder + func (o *ResourceHolder) AsBytes() ([]byte, error) + func (o *ResourceHolder) AsString() (string, error) + func (o *ResourceHolder) Open() (io.Reader, error) + func (o *ResourceHolder) UnmarshalJSON(data []byte) error + func (o *ResourceHolder) Unwrap() Resource + type Secret struct + Data []byte + func CreateSecret() (*Secret, error) + func (s *Secret) AsString() (string, error) + type SecretStore interface + FindSecret func(id string) (*Secret, error) + GetOrCreateSecret func(id string, secret *Secret) (current *Secret, created bool, err error) + ListSecrets func() ([]string, error) + Secret func(id string) (*Secret, error) + VFSPath func() vfs.Path + func NewVFSSecretStore(basedir vfs.Path) SecretStore + type Source struct + ExtractFromArchive string + Hash *hashing.Hash + Parent *Source + URL string + func (s *Source) Key() string + func (s *Source) String() string + type StateStore interface + CA func() CAStore + ListChildren func(pathPrefix string) ([]string, error) + ReadConfig func(path string, config interface{}) error + Secrets func() SecretStore + VFSPath func() vfs.Path + WriteConfig func(path string, config interface{}, options ...WriteOption) error + type StringResource struct + func NewStringResource(s string) *StringResource + func (s *StringResource) Open() (io.Reader, error) + func (s *StringResource) WriteTo(out io.Writer) error + type Target interface + Finish func(taskMap map[string]Task) error + type Task interface + Run func(*Context) error + type TemplateResource interface + Curry func(args []string) TemplateResource + type User struct + Comment string + Gid int + Home string + Name string + Shell string + Uid int + func LookupUser(name string) (*User, error) + func LookupUserById(uid int) (*User, error) + type VFSCAStore struct + DryRun bool + func (c *VFSCAStore) AddCert(id string, cert *Certificate) error + func (c *VFSCAStore) AddSSHPublicKey(name string, pubkey []byte) error + func (c *VFSCAStore) Cert(id string) (*Certificate, error) + func (c *VFSCAStore) CertificatePool(id string) (*CertificatePool, error) + func (c *VFSCAStore) CreateKeypair(id string, template *x509.Certificate) (*Certificate, *PrivateKey, error) + func (c *VFSCAStore) CreatePrivateKey(id string, serial *big.Int) (*PrivateKey, error) + func (c *VFSCAStore) DeleteSecret(item *KeystoreItem) error + func (c *VFSCAStore) FindCert(id string) (*Certificate, error) + func (c *VFSCAStore) FindCertificatePool(id string) (*CertificatePool, error) + func (c *VFSCAStore) FindPrivateKey(id string) (*PrivateKey, error) + func (c *VFSCAStore) FindSSHPublicKeys(name string) ([]*KeystoreItem, error) + func (c *VFSCAStore) IssueCert(id string, serial *big.Int, privateKey *PrivateKey, template *x509.Certificate) (*Certificate, error) + func (c *VFSCAStore) List() ([]*KeystoreItem, error) + func (c *VFSCAStore) PrivateKey(id string) (*PrivateKey, error) + func (s *VFSCAStore) VFSPath() vfs.Path + type VFSResource struct + Path vfs.Path + func NewVFSResource(path vfs.Path) *VFSResource + func (r *VFSResource) Open() (io.Reader, error) + type VFSSecretStore struct + func (c *VFSSecretStore) FindSecret(id string) (*Secret, error) + func (c *VFSSecretStore) GetOrCreateSecret(id string, secret *Secret) (*Secret, bool, error) + func (c *VFSSecretStore) ListSecrets() ([]string, error) + func (c *VFSSecretStore) Secret(id string) (*Secret, error) + func (s *VFSSecretStore) VFSPath() vfs.Path + type VFSStateStore struct + func NewVFSStateStore(base vfs.Path, clusterName string) *VFSStateStore + func (s *VFSStateStore) CA() CAStore + func (s *VFSStateStore) ListChildren(pathPrefix string) ([]string, error) + func (s *VFSStateStore) ReadConfig(path string, config interface{}) error + func (s *VFSStateStore) Secrets() SecretStore + func (s *VFSStateStore) VFSPath() vfs.Path + func (s *VFSStateStore) WriteConfig(path string, config interface{}, writeOptions ...WriteOption) error + type WriteOption string + const WriteOptionCreate + const WriteOptionOnlyIfExists v1.4.0-alpha.1 Sep 8, 2016