ubuntuimage

package
v0.0.0-...-0000000 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2016 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Helpers to work with an Ubuntu image based Upgrade implementation

Copyright (c) 2013 Canonical Ltd.

Written by Sergio Schvezov <sergio.schvezov@canonical.com>

Helpers to work with an Ubuntu image based Upgrade implementation

Copyright (c) 2013 Canonical Ltd.

Written by Sergio Schvezov <sergio.schvezov@canonical.com>

Helpers to work with an Ubuntu image based Upgrade implementation

Copyright (c) 2013 Canonical Ltd.

Written by Sergio Schvezov <sergio.schvezov@canonical.com>

Helpers to work with an Ubuntu image based Upgrade implementation

Copyright (c) 2013 Canonical Ltd.

Written by Sergio Schvezov <sergio.schvezov@canonical.com>

Index

Constants

View Source
const (
	FULL_IMAGE = "full"
)

Variables

This section is empty.

Functions

func GetCacheDir

func GetCacheDir() (cacheDir string)

func GetUbuntuCommands

func GetUbuntuCommands(files []File, downloadDir string, wipe bool, enable []string) (commandsFile string, err error)

func TLSSkipVerify

func TLSSkipVerify()

TLSSkipVerify turns off validation of server TLS certificates. It allows connecting to HTTPS servers that use self-signed certificates.

Types

type By

type By func(p1, p2 *File) bool

By is the type of a "less" function that defines the ordering of its File arguments.

func (By) Sort

func (by By) Sort(files []File)

Sort is a method on the function type, By, that sorts the argument slice according to the function.

type Channel

type Channel struct {
	Devices map[string]Device `json:"devices"`
	Alias   string            `json:"alias"`
	Hidden  bool              `json:"hidden,omitempty"`
}

type Channels

type Channels map[string]Channel

func NewChannels

func NewChannels(server string) (channels Channels, err error)

func (Channels) GetDeviceChannel

func (channels Channels) GetDeviceChannel(server, channel, device string) (deviceChannel DeviceChannel, err error)

type Device

type Device struct {
	Index string
}

type DeviceChannel

type DeviceChannel struct {
	Url    string
	Alias  string
	Images []Image
}

func (*DeviceChannel) GetImage

func (deviceChannel *DeviceChannel) GetImage(revision int) (image Image, err error)

func (*DeviceChannel) GetRelativeImage

func (deviceChannel *DeviceChannel) GetRelativeImage(revision int) (image Image, err error)

func (*DeviceChannel) ListImageVersions

func (deviceChannel *DeviceChannel) ListImageVersions() (err error)

type File

type File struct {
	Server                    string
	Checksum, Path, Signature string
	Size, Order               int
}

func GetGPGFiles

func GetGPGFiles() []File

func (File) Download

func (file File) Download(downloadDir string) (err error)

func (*File) MakeRelativeToServer

func (file *File) MakeRelativeToServer(defaultServer string) error

MakeRelativeToServer changes absolute paths in Path into a relative path and adds the host part to Server, if the Path is already relative it uses defaultServer

type Image

type Image struct {
	Description, Type string
	Version           int
	Files             []File
}

type ImageBy

type ImageBy func(p1, p2 *Image) bool

By is the type of a "less" function that defines the ordering of its File arguments.

func (ImageBy) ImageSort

func (by ImageBy) ImageSort(images []Image)

Sort is a method on the function type, By, that sorts the argument slice according to the function.

type ImageVersion

type ImageVersion struct {
	Description string
}

type ImageVersions

type ImageVersions map[int]ImageVersion

Jump to

Keyboard shortcuts

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