git

package
v4.3.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: BSD-3-Clause, BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteMetadata added in v1.0.33

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

func GetAllMetadata added in v1.0.30

func GetAllMetadata(ctx context.Context, g *libkb.GlobalContext) ([]keybase1.GitRepoResult, error)

func GetMetadata added in v1.0.30

func HumanizeGitErrors added in v1.0.33

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.

func PutMetadata added in v1.0.30

func SetTeamRepoSettings added in v1.0.40

func SetTeamRepoSettings(ctx context.Context, g *libkb.GlobalContext, arg keybase1.SetTeamRepoSettingsArg) error

Types

type ByRepoMtime

type ByRepoMtime []keybase1.GitRepoResult

func (ByRepoMtime) Len

func (c ByRepoMtime) Len() int

func (ByRepoMtime) Less

func (c ByRepoMtime) Less(i, j int) bool

func (ByRepoMtime) Swap

func (c ByRepoMtime) Swap(i, j int)

type Crypto added in v1.0.30

type Crypto struct {
	libkb.Contextified
}

Crypto implements Cryptoer interface.

func NewCrypto added in v1.0.30

func NewCrypto(g *libkb.GlobalContext) *Crypto

NewCrypto returns a Crypto object.

func (*Crypto) Box added in v1.0.30

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 added in v1.0.30

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 added in v1.0.30

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

func (*ServerResponse) GetAppStatus added in v1.0.30

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

For GetDecode.

type ServerResponseRepo added in v1.0.30

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"`
	IsImplicit            bool                          `json:"is_implicit"`
	Role                  keybase1.TeamRole             `json:"role"`
}

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.FolderHandle) (teamID keybase1.TeamIDWithVisibility, err error)
}

Teamer handles teams for use with the Git index

func NewTeamer added in v1.0.30

func NewTeamer(g *libkb.GlobalContext) Teamer

type TeamerImpl added in v1.0.30

type TeamerImpl struct {
	libkb.Contextified
}

func (*TeamerImpl) LookupOrCreate added in v1.0.30

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

Jump to

Keyboard shortcuts

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