file

package
v0.0.0-...-28b0f66 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2017 License: MIT, Zlib Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TLSStorePath represents the subfolder where TLS files are stored in the file store folder.
	TLSStorePath = "tls"
	// LDAPStorePath represents the subfolder where LDAP TLS files are stored in the TLSStorePath.
	LDAPStorePath = "ldap"
	// TLSCACertFile represents the name on disk for a TLS CA file.
	TLSCACertFile = "ca.pem"
	// TLSCertFile represents the name on disk for a TLS certificate file.
	TLSCertFile = "cert.pem"
	// TLSKeyFile represents the name on disk for a TLS key file.
	TLSKeyFile = "key.pem"
	// ComposeStorePath represents the subfolder where compose files are stored in the file store folder.
	ComposeStorePath = "compose"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service represents a service for managing files and directories.

func NewService

func NewService(dataStorePath, fileStorePath string) (*Service, error)

NewService initializes a new service. It creates a data directory and a directory to store files inside this directory if they don't exist.

func (*Service) DeleteStackFiles

func (service *Service) DeleteStackFiles(projectPath string) error

DeleteStackFiles deletes a folder containing all the files associated to a stack.

func (*Service) DeleteTLSFiles

func (service *Service) DeleteTLSFiles(folder string) error

DeleteTLSFiles deletes a folder containing the TLS files for an endpoint.

func (*Service) GetPathForTLSFile

func (service *Service) GetPathForTLSFile(folder string, fileType dockm.TLSFileType) (string, error)

GetPathForTLSFile returns the absolute path to a specific TLS file for an endpoint.

func (*Service) StoreComposeEnvFile

func (service *Service) StoreComposeEnvFile(name, envFileContent string) error

StoreComposeEnvFile stores a new .env file in the stack store path using the content of envFileContent.

func (*Service) StoreComposeFile

func (service *Service) StoreComposeFile(name, composeFileContent string) (string, error)

StoreComposeFile creates a subfolder in the ComposeStorePath and stores a new file using the content from composeFileContent. It returns the path to the folder where the file is stored.

func (*Service) StoreTLSFile

func (service *Service) StoreTLSFile(folder string, fileType dockm.TLSFileType, r io.Reader) error

StoreTLSFile creates a folder in the TLSStorePath and stores a new file with the content from r.

Jump to

Keyboard shortcuts

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