git

package
v2.1.2-MOBILE+incompat... Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2018 License: BSD-3-Clause, BSD-3-Clause Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteMetadata

func DeleteMetadata(ctx context.Context, g *libkb.GlobalContext, folder keybase1.Folder, repoName keybase1.GitRepoName) error

func HumanizeGitErrors

func HumanizeGitErrors(ctx context.Context, g *libkb.GlobalContext, err error) error

For errors that expect, replace them with nice strings for the user. The GUI will show these directly.

Types

type Crypto

type Crypto struct {
	libkb.Contextified
}

Crypto implements Cryptoer interface.

func NewCrypto

func NewCrypto(g *libkb.GlobalContext) *Crypto

NewCrypto returns a Crypto object.

func (*Crypto) Box

Box encrypts the plaintext with the most current key for the given team. It yields a NaCl ciphertext and nonce, and also says which generation of the key it used.

func (*Crypto) Unbox

func (c *Crypto) Unbox(ctx context.Context, teamSpec keybase1.TeamIDWithVisibility, metadata *keybase1.EncryptedGitMetadata) (plaintext []byte, err error)

Unbox decrypts the given ciphertext with the given nonce, for the given generation of the given team. Can return an error. Will return a non-nil plaintext on success.

type Cryptoer

type Cryptoer interface {
	// Box encrypts the plaintext with the most current key for the given team. It yields a NaCl
	// ciphertext and nonce, and also says which generation of the key it used.
	Box(ctx context.Context, plaintext []byte, team keybase1.TeamIDWithVisibility) (*keybase1.EncryptedGitMetadata, error)
	// Unbox decrypts the given ciphertext with the given nonce, for the given generation of the
	// given team. Can return an error. Will return a non-nil plaintext on success.
	Unbox(ctx context.Context, team keybase1.TeamIDWithVisibility, metadata *keybase1.EncryptedGitMetadata) (plaintext []byte, err error)
}

Cryptoer handles crypto operations to encrypt and decrypt data as it is sent to or received from the server-side Git index.

type ServerResponse

type ServerResponse struct {
	Repos  []ServerResponseRepo `json:"repos"`
	Status libkb.AppStatus      `json:"status"`
}

func (*ServerResponse) GetAppStatus

func (r *ServerResponse) GetAppStatus() *libkb.AppStatus

For GetDecode.

type ServerResponseRepo

type ServerResponseRepo struct {
	TeamID                keybase1.TeamID               `json:"team_id"`
	RepoID                keybase1.RepoID               `json:"repo_id"`
	CTime                 time.Time                     `json:"ctime"`
	MTime                 time.Time                     `json:"mtime"`
	EncryptedMetadata     string                        `json:"encrypted_metadata"`
	EncryptionVersion     int                           `json:"encryption_version"`
	Nonce                 string                        `json:"nonce"`
	KeyGeneration         keybase1.PerTeamKeyGeneration `json:"key_generation"`
	LastModifyingUID      keybase1.UID                  `json:"last_writer_uid"`
	LastModifyingDeviceID keybase1.DeviceID             `json:"last_writer_device_id"`
	ChatConvID            string                        `json:"chat_conv_id"`
	ChatDisabled          bool                          `json:"chat_disabled"`
}

type Teamer

type Teamer interface {
	// LookupOrCreate either lookups or creates a team that corresponds to the given Folder
	// Does not create new named teams.
	LookupOrCreate(ctx context.Context, folder keybase1.Folder) (teamID keybase1.TeamIDWithVisibility, err error)
}

Teamer handles teams for use with the Git index

func NewTeamer

func NewTeamer(g *libkb.GlobalContext) Teamer

type TeamerImpl

type TeamerImpl struct {
	libkb.Contextified
}

func (*TeamerImpl) LookupOrCreate

func (t *TeamerImpl) LookupOrCreate(ctx context.Context, folder keybase1.Folder) (res keybase1.TeamIDWithVisibility, err error)

Jump to

Keyboard shortcuts

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