gs

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Copyright 2021 The Chromium OS Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2021 The Chromium OS Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	WriteFileToGS(gsPath gs.Path, data []byte) error
	Download(gsPath gs.Path, localPath string) error
}

type FakeClient

type FakeClient struct {
	T                 *testing.T
	ExpectedWrites    map[string]*repo.Manifest
	ExpectedDownloads map[string][]byte
}

func (*FakeClient) Download

func (f *FakeClient) Download(gsPath gs.Path, localPath string) error

func (*FakeClient) WriteFileToGS

func (f *FakeClient) WriteFileToGS(gsPath gs.Path, data []byte) error

WriteFileToGS writes the specified data to the specified gs path.

type ProdClient

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

func NewProdClient

func NewProdClient(ctx context.Context, authedClient *http.Client) (*ProdClient, error)

func (*ProdClient) Download

func (g *ProdClient) Download(gsPath gs.Path, localPath string) error

ReadFileFromGS reads the specified path from gs to the specified local path.

func (*ProdClient) WriteFileToGS

func (g *ProdClient) WriteFileToGS(gsPath gs.Path, data []byte) error

WriteFileToGS writes the specified data to the specified gs path.

Jump to

Keyboard shortcuts

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