MCPcopy Create free account
hub / github.com/bufbuild/buf / UploadWithCreateIfNotExist

Function UploadWithCreateIfNotExist

private/bufpkg/bufmodule/uploader.go:65–71  ·  view source on GitHub ↗

UploadWithCreateIfNotExist returns a new UploadOption that will result in the Modules being created on the registry with the given visibility and default label if they do not exist. If the default label name is not provided, the module will be created with the default label "main".

(createModuleVisibility ModuleVisibility, createDefaultLabel string)

Source from the content-addressed store, hash-verified

63// Modules being created on the registry with the given visibility and default label if they do not exist.
64// If the default label name is not provided, the module will be created with the default label "main".
65func UploadWithCreateIfNotExist(createModuleVisibility ModuleVisibility, createDefaultLabel string) UploadOption {
66 return func(uploadOptions *uploadOptions) {
67 uploadOptions.createIfNotExist = true
68 uploadOptions.createModuleVisibility = createModuleVisibility
69 uploadOptions.createDefaultLabel = createDefaultLabel
70 }
71}
72
73// UploadWithSourceControlURL returns a new UploadOption that will set the source control
74// url for the module contents uploaded.

Callers 2

runFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…