buf
No long description provided.
Installation
dagger install github.com/JFenstermacher/daggerverse/buf@ac473ac7f040963aa23bad9500e8388ab824c8b6
Entrypoint
Return Type
Buf !
Arguments
Name | Type | Description |
---|---|---|
source | Directory ! | Project source directory |
packages | [String ! ] | Packages to install |
config | String | Path to buf.yaml |
Example
dagger -m github.com/JFenstermacher/daggerverse/buf@ac473ac7f040963aa23bad9500e8388ab824c8b6 call \
--source DIR_PATH
func (m *myModule) example(source *Directory) *Buf {
return dag.
Buf(source)
}
@function
def example(source: dagger.Directory, ) -> dag.Buf:
return (
dag.buf(source)
)
@func()
example(source: Directory, ): Buf {
return dag
.buf(source)
}
Types
Buf 🔗
Buf project
packages() 🔗
Go packages to install Each will be run with ‘go install ’ The following packages will be installed by default: * github.com/bufbuild/buf/cmd/buf@latest * google.golang.org/protobuf/cmd/protoc-gen-go@latest * connectrpc.com/connect/cmd/protoc-gen-connect-go@latest
Return Type
[String ! ] !
Example
dagger -m github.com/JFenstermacher/daggerverse/buf@ac473ac7f040963aa23bad9500e8388ab824c8b6 call \
--source DIR_PATH packages
func (m *myModule) example(ctx context.Context, source *Directory) []string {
return dag.
Buf(source).
Packages(ctx)
}
@function
async def example(source: dagger.Directory, ) -> List[str]:
return await (
dag.buf(source)
.packages()
)
@func()
async example(source: Directory, ): Promise<string[]> {
return dag
.buf(source)
.packages()
}
source() 🔗
Project source directory
Return Type
Directory !
Example
dagger -m github.com/JFenstermacher/daggerverse/buf@ac473ac7f040963aa23bad9500e8388ab824c8b6 call \
--source DIR_PATH source
func (m *myModule) example(source *Directory) *Directory {
return dag.
Buf(source).
Source()
}
@function
def example(source: dagger.Directory, ) -> dagger.Directory:
return (
dag.buf(source)
.source()
)
@func()
example(source: Directory, ): Directory {
return dag
.buf(source)
.source()
}
config() 🔗
Path to config file
Return Type
String !
Example
dagger -m github.com/JFenstermacher/daggerverse/buf@ac473ac7f040963aa23bad9500e8388ab824c8b6 call \
--source DIR_PATH config
func (m *myModule) example(ctx context.Context, source *Directory) string {
return dag.
Buf(source).
Config(ctx)
}
@function
async def example(source: dagger.Directory, ) -> str:
return await (
dag.buf(source)
.config()
)
@func()
async example(source: Directory, ): Promise<string> {
return dag
.buf(source)
.config()
}
container() 🔗
Buf container with packages installed
Return Type
Container !
Example
dagger -m github.com/JFenstermacher/daggerverse/buf@ac473ac7f040963aa23bad9500e8388ab824c8b6 call \
--source DIR_PATH container
func (m *myModule) example(source *Directory) *Container {
return dag.
Buf(source).
Container()
}
@function
def example(source: dagger.Directory, ) -> dagger.Container:
return (
dag.buf(source)
.container()
)
@func()
example(source: Directory, ): Container {
return dag
.buf(source)
.container()
}
lint() 🔗
Lint protobuf files
Return Type
Container !
Example
dagger -m github.com/JFenstermacher/daggerverse/buf@ac473ac7f040963aa23bad9500e8388ab824c8b6 call \
--source DIR_PATH lint
func (m *myModule) example(source *Directory) *Container {
return dag.
Buf(source).
Lint()
}
@function
def example(source: dagger.Directory, ) -> dagger.Container:
return (
dag.buf(source)
.lint()
)
@func()
example(source: Directory, ): Container {
return dag
.buf(source)
.lint()
}
format() 🔗
Formats protobuf files
Return Type
Directory !
Example
dagger -m github.com/JFenstermacher/daggerverse/buf@ac473ac7f040963aa23bad9500e8388ab824c8b6 call \
--source DIR_PATH format
func (m *myModule) example(source *Directory) *Directory {
return dag.
Buf(source).
Format()
}
@function
def example(source: dagger.Directory, ) -> dagger.Directory:
return (
dag.buf(source)
.format()
)
@func()
example(source: Directory, ): Directory {
return dag
.buf(source)
.format()
}
generate() 🔗
Generate services and clients based on buf.gen.yaml
Return Type
Directory !
Example
dagger -m github.com/JFenstermacher/daggerverse/buf@ac473ac7f040963aa23bad9500e8388ab824c8b6 call \
--source DIR_PATH generate
func (m *myModule) example(source *Directory) *Directory {
return dag.
Buf(source).
Generate()
}
@function
def example(source: dagger.Directory, ) -> dagger.Directory:
return (
dag.buf(source)
.generate()
)
@func()
example(source: Directory, ): Directory {
return dag
.buf(source)
.generate()
}