Documentation ¶
Index ¶
- func DigestForCommitID(ctx context.Context, clientProvider interface{ ... }, registry string, ...) (bufmodule.Digest, error)
- func DigestToV1Beta1Proto(digest bufmodule.Digest) (*modulev1beta1.Digest, error)
- func DigestToV1Proto(digest bufmodule.Digest) (*modulev1.Digest, error)
- func NewCommitProvider(logger *zap.Logger, clientProvider interface{ ... }) bufmodule.CommitProvider
- func NewGraphProvider(logger *zap.Logger, clientProvider interface{ ... }, ...) bufmodule.GraphProvider
- func NewModuleDataProvider(logger *zap.Logger, clientProvider interface{ ... }, ...) bufmodule.ModuleDataProvider
- func NewModuleKeyProvider(logger *zap.Logger, clientProvider interface{ ... }) bufmodule.ModuleKeyProvider
- func NewUploader(logger *zap.Logger, clientProvider interface{ ... }, options ...UploaderOption) bufmodule.Uploader
- func V1Beta1ProtoToDigest(protoDigest *modulev1beta1.Digest) (bufmodule.Digest, error)
- func V1ProtoToDigest(protoDigest *modulev1.Digest) (bufmodule.Digest, error)
- type GraphProviderOption
- type UploaderOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DigestForCommitID ¶
func DigestForCommitID( ctx context.Context, clientProvider interface { bufapi.V1CommitServiceClientProvider bufapi.V1Beta1CommitServiceClientProvider }, registry string, commitID uuid.UUID, digestType bufmodule.DigestType, ) (bufmodule.Digest, error)
DigestForCommitID resolves the commit ID by calling the CommitService to get the Digest for the Commit.
func DigestToV1Beta1Proto ¶
func DigestToV1Beta1Proto(digest bufmodule.Digest) (*modulev1beta1.Digest, error)
DigestToV1Beta1Proto converts the given Digest to a proto Digest.
func DigestToV1Proto ¶
DigestToV1Proto converts the given Digest to a proto Digest.
func NewCommitProvider ¶
func NewCommitProvider( logger *zap.Logger, clientProvider interface { bufapi.V1CommitServiceClientProvider bufapi.V1ModuleServiceClientProvider bufapi.V1OwnerServiceClientProvider bufapi.V1Beta1CommitServiceClientProvider }, ) bufmodule.CommitProvider
NewCommitProvider returns a new CommitProvider for the given API client.
func NewGraphProvider ¶
func NewGraphProvider( logger *zap.Logger, clientProvider interface { bufapi.V1GraphServiceClientProvider bufapi.V1ModuleServiceClientProvider bufapi.V1OwnerServiceClientProvider bufapi.V1Beta1GraphServiceClientProvider }, options ...GraphProviderOption, ) bufmodule.GraphProvider
NewGraphProvider returns a new GraphProvider for the given API client.
func NewModuleDataProvider ¶
func NewModuleDataProvider( logger *zap.Logger, clientProvider interface { bufapi.V1DownloadServiceClientProvider bufapi.V1ModuleServiceClientProvider bufapi.V1Beta1DownloadServiceClientProvider }, graphProvider bufmodule.GraphProvider, ) bufmodule.ModuleDataProvider
NewModuleDataProvider returns a new ModuleDataProvider for the given API client.
A warning is printed to the logger if a given Module is deprecated.
func NewModuleKeyProvider ¶
func NewModuleKeyProvider( logger *zap.Logger, clientProvider interface { bufapi.V1CommitServiceClientProvider bufapi.V1Beta1CommitServiceClientProvider }, ) bufmodule.ModuleKeyProvider
NewModuleKeyProvider returns a new ModuleKeyProvider for the given API clients.
func NewUploader ¶
func NewUploader( logger *zap.Logger, clientProvider interface { bufapi.V1ModuleServiceClientProvider bufapi.V1UploadServiceClientProvider bufapi.V1Beta1UploadServiceClientProvider }, options ...UploaderOption, ) bufmodule.Uploader
NewUploader returns a new Uploader for the given API client.
func V1Beta1ProtoToDigest ¶
func V1Beta1ProtoToDigest(protoDigest *modulev1beta1.Digest) (bufmodule.Digest, error)
V1Beta1ProtoToDigest converts the given proto Digest to a Digest.
Validation is performed to ensure the DigestType is known, and the value is a valid digest value for the given DigestType.
Types ¶
type GraphProviderOption ¶
type GraphProviderOption func(*graphProvider)
GraphProviderOption is an option for a new GraphProvider.
func GraphProviderWithLegacyFederationRegistry ¶
func GraphProviderWithLegacyFederationRegistry(legacyFederationRegistry string) GraphProviderOption
GraphProviderWithLegacyFederationRegistry returns a new GraphProviderOption that specifies the hostname of an additional registry that is allowed to use legacy federation. This should only be used in testing.
func GraphProviderWithPublicRegistry ¶
func GraphProviderWithPublicRegistry(publicRegistry string) GraphProviderOption
GraphProviderWithPublicRegistry returns a new GraphProviderOption that specifies the hostname of the public registry. By default this is "buf.build", however in testing, this may be something else. This is needed to discern which which registry to make calls against in the case where there is >1 registries represented in the ModuleKeys - we always want to call the non-public registry.
type UploaderOption ¶
type UploaderOption func(*uploader)
UploaderOption is an option for a new Uploader.
func UploaderWithPublicRegistry ¶
func UploaderWithPublicRegistry(publicRegistry string) UploaderOption
UploaderWithPublicRegistry returns a new UploaderOption that specifies the hostname of the public registry. By default this is "buf.build", however in testing, this may be something else. This is needed to discern which which registry to make calls against in the case where there is >1 registries represented in the ModuleKeys - we always want to call the non-public registry.
Source Files ¶
- bufmoduleapi.go
- commit_provider.go
- convert.go
- digest_for_commit_id.go
- errors.go
- graph_provider.go
- module_data_provider.go
- module_key_for_universal_proto_commit.go
- module_key_provider.go
- registry.go
- universal_proto_commit.go
- universal_proto_content.go
- universal_proto_file.go
- uploader.go
- usage.gen.go
- v1_proto_module_provider.go
- v1_proto_owner_provider.go