Documentation ¶
Index ¶
Constants ¶
View Source
const (
// ConfigFileName is the name of config file
ConfigFileName = "config.json"
)
Variables ¶
View Source
var KeyAES []byte
Functions ¶
func AESDecrypt ¶
AESDecrypt will decrypt the ciphertext via the given key.
func AESEncrypt ¶
AESEncrypt will encrypt the message with cipher feedback mode with the given key.
func DecodeAuth ¶
DecodeAuth decodes a base64 encoded string and returns username and password
func InitAESKey ¶
Types ¶
type AuthConfig ¶
type AuthConfig struct { Username string `json:"uername,omitempty"` Password string `json:"password,omitempty"` Auth string `json:"auth"` Email string `json:"email,omitempty"` ServerAddress string `json:"serveraddress:,omitempty"` IdentityToken string `json:"identitytoken,omitempty"` RegistryToken string `json:"registrytoken,omitempty"` }
AuthConfig contains authorization infomation for connecting to a Registry
type ConfigFile ¶
type ConfigFile struct { AuthConfigs map[string]AuthConfig `json:"auths"` HTTPHeaders map[string]string `json:"HttpHeaders,omitempty"` PsFormat string `json:"psFormat,omitempty"` ImagesFormat string `json:"imagesFormat,omitempty"` DetachKeys string `json:"detachKeys,omitempty"` CredentialsStore string `json:"credsStore,omitempty"` // contains filtered or unexported fields }
ConfigFile ~/.docker/config.json file info
func Load ¶
func Load(configDir string) (*ConfigFile, error)
Load reads the configuration files in the given directory
func NewConfigFile ¶
func NewConfigFile(fn string) *ConfigFile
NewConfigFile initilizes am empty configuration file for the given filename 'fn'
func (*ConfigFile) LoadFromReader ¶
func (configFile *ConfigFile) LoadFromReader(configData io.Reader) error
Click to show internal directories.
Click to hide internal directories.