messages

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(in services.Message) ([]byte, int, error)

func Unmarshal

func Unmarshal(in []byte) (services.Message, error)

Types

type GetPackages

type GetPackages struct {
	Path    string
	Tags    []string
	Source  map[string]string // Map of path->hash of previously downloaded source dependencies to use if still in the cache
	Objects map[string]string // Map of path->hash of previously downloaded objects dependencies to use if still in the cache
}

type IndexItem

type IndexItem struct {
	Hash      string // Hash of the item
	Unchanged bool   // Unchanged is true if the package already exists in the client cache.
}

IndexItem is an item in PackagesIndex. Unchanged is true if the client already has cached as specified by Cache in the GetPackages message. Unchanged dependencies are not sent as Source / Objects messages.

type Objects

type Objects struct {
	Path     string
	Hash     string // Hash of the object pack
	Standard bool
}

Objects contains information about the object pack

type PackageIndex

type PackageIndex struct {
	Path    string
	Tags    []string
	Source  map[string]IndexItem
	Objects map[string]IndexItem
}

PackagesIndex is returned to the client to summarize the Source and Objects messages that were also sent, and to confirm which were not sent because the cache was up-to-date.

type Payload

type Payload struct {
	Message services.Message
}

type Source

type Source struct {
	Path     string
	Hash     string // Hash of the source pack
	Standard bool
}

Source contains information about the source pack

Jump to

Keyboard shortcuts

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