Documentation ¶
Index ¶
- func DeleteMetadata(ctx context.Context, g *libkb.GlobalContext, folder keybase1.Folder, ...) error
- 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 GetTeamRepoSettings(ctx context.Context, g *libkb.GlobalContext, ...) (keybase1.GitTeamRepoSettings, error)
- func HumanizeGitErrors(ctx context.Context, g *libkb.GlobalContext, err error) error
- func PutMetadata(ctx context.Context, g *libkb.GlobalContext, arg keybase1.PutGitMetadataArg) error
- func SetTeamRepoSettings(ctx context.Context, g *libkb.GlobalContext, ...) 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 DeleteMetadata ¶
func DeleteMetadata(ctx context.Context, g *libkb.GlobalContext, folder keybase1.Folder, repoName keybase1.GitRepoName) error
func GetAllMetadata ¶
func GetAllMetadata(ctx context.Context, g *libkb.GlobalContext) ([]keybase1.GitRepoResult, error)
func GetMetadata ¶
func GetMetadata(ctx context.Context, g *libkb.GlobalContext, folder keybase1.Folder) ([]keybase1.GitRepoResult, error)
func GetTeamRepoSettings ¶
func GetTeamRepoSettings(ctx context.Context, g *libkb.GlobalContext, arg keybase1.GetTeamRepoSettingsArg) (keybase1.GitTeamRepoSettings, error)
func HumanizeGitErrors ¶
For errors that expect, replace them with nice strings for the user. The GUI will show these directly.
func PutMetadata ¶
func PutMetadata(ctx context.Context, g *libkb.GlobalContext, arg keybase1.PutGitMetadataArg) error
func SetTeamRepoSettings ¶
func SetTeamRepoSettings(ctx context.Context, g *libkb.GlobalContext, arg keybase1.SetTeamRepoSettingsArg) error
Types ¶
type Crypto ¶
type Crypto struct {
libkb.Contextified
}
Crypto implements Cryptoer interface.
func (*Crypto) Box ¶
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 ¶
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)