gcs

package module
v0.0.0-...-6e5a477 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 18 Imported by: 0

README

apt-transport-gcs

APT Google Cloud Storage Transport

Allows one to use a private GCS Bucket as an APT repository. Authentication is handled by gcloud tool locally or by application default credentials on Google Compute Engine

License

MIT - See LICENSE file

Requirements

Working Go installation, if you don't have one see Golang official help page

This should build the gs binary for amd64 Linux - change as needed

go get github.com/ceocoder/apt-gcs/cmd
env GOOS=linux GOARCH=amd64 go build -o gs github.com/ceocoder/apt-gcs/cmd

Copy generated binary gs to your /usr/lib/apt/methods/ directory

Something like this should work in theory

deb gs://my-debs stable main

It will work with an APT repo generated by reprepro or Aptly and gsutil rsynced to Google Cloud Storage

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig()

InitConfig creates the google storage client that is used from the apt package

Types

type AptMessage

type AptMessage struct {
	Code    int
	Headers map[string]string
}

func (*AptMessage) Encode

func (a *AptMessage) Encode() string

type AptMethod

type AptMethod struct {
}

func (*AptMethod) ReadObejct

func (a *AptMethod) ReadObejct(message map[string]string)

func (*AptMethod) Run

func (a *AptMethod) Run() (exitCode int)

func (*AptMethod) Send

func (a *AptMethod) Send(code int, headers map[string]string)

func (*AptMethod) SendCapabilities

func (a *AptMethod) SendCapabilities()

func (*AptMethod) SendStatus

func (a *AptMethod) SendStatus(headers map[string]string)

func (*AptMethod) SendUriDone

func (a *AptMethod) SendUriDone(headers map[string]string)

func (*AptMethod) SendUriFailure

func (a *AptMethod) SendUriFailure(headers map[string]string)

func (*AptMethod) SendUriStart

func (a *AptMethod) SendUriStart(headers map[string]string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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