Documentation ¶
Index ¶
- func GetAllMetadata(ctx context.Context, g *libkb.GlobalContext) ([]keybase1.GitRepoResult, error)
- func GetMetadata(ctx context.Context, g *libkb.GlobalContext, folder keybase1.Folder) ([]keybase1.GitRepoResult, error)
- func PutMetadata(ctx context.Context, g *libkb.GlobalContext, arg keybase1.PutGitMetadataArg) error
- type Crypto
- type Cryptoer
- type ServerResponse
- type ServerResponseRepo
- type Teamer
- type TeamerImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 GetMetadata(ctx context.Context, g *libkb.GlobalContext, folder keybase1.Folder) ([]keybase1.GitRepoResult, error)
func PutMetadata ¶ added in v1.0.30
func PutMetadata(ctx context.Context, g *libkb.GlobalContext, arg keybase1.PutGitMetadataArg) error
Types ¶
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
func (c *Crypto) Box(ctx context.Context, plaintext []byte, teamSpec keybase1.TeamIDWithVisibility) (*keybase1.EncryptedGitMetadata, error)
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) ([]byte, 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"` LastModifyingUsername string `json:"last_writer_username"` LastModifyingDeviceID keybase1.DeviceID `json:"last_writer_device_id"` }
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 ¶ 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.Folder) (res keybase1.TeamIDWithVisibility, err error)
Click to show internal directories.
Click to hide internal directories.