Dagger
Search

minio

This module is designed for development and CI purposes only, do not use it to host a production server. The module implements a server and a client that can work together.

It's designed to be used in other dagger modules but also as standalone.

Installation

dagger install github.com/quartz-technology/daggerverse/minio@v0.0.3

Entrypoint

Return Type
Minio !
Arguments
NameTypeDescription
versionString !version of Minio to use.
serverPortInteger !port to listen to the server.
consolePortInteger !port to listen to the console.
usernameSecret username to use.
passwordSecret username to use.
cacheBoolean cache enables long living storage on the server.
Example
func (m *myModule) example(version string, serverPort int, consolePort int) *Minio  {
	return dag.
			Minio(version, serverPort, consolePort)
}
@function
def example(version: str, server_port: int, console_port: int, ) -> dag.Minio:
	return (
		dag.minio(version, server_port, console_port)
	)
@func()
example(version: string, serverPort: number, consolePort: number, ): Minio {
	return dag
		.minio(version, serverPort, consolePort)
}

Types

Minio 🔗

version() 🔗

Return Type
String !
Example
func (m *myModule) example(ctx context.Context, version string, serverPort int, consolePort int) string  {
	return dag.
			Minio(version, serverPort, consolePort).
			Version(ctx)
}
@function
async def example(version: str, server_port: int, console_port: int, ) -> str:
	return await (
		dag.minio(version, server_port, console_port)
		.version()
	)
@func()
async example(version: string, serverPort: number, consolePort: number, ): Promise<string> {
	return dag
		.minio(version, serverPort, consolePort)
		.version()
}

serverPort() 🔗

Return Type
Integer !
Example
func (m *myModule) example(ctx context.Context, version string, serverPort int, consolePort int) int  {
	return dag.
			Minio(version, serverPort, consolePort).
			ServerPort(ctx)
}
@function
async def example(version: str, server_port: int, console_port: int, ) -> int:
	return await (
		dag.minio(version, server_port, console_port)
		.server_port()
	)
@func()
async example(version: string, serverPort: number, consolePort: number, ): Promise<number> {
	return dag
		.minio(version, serverPort, consolePort)
		.serverPort()
}

consolePort() 🔗

Return Type
Integer !
Example
func (m *myModule) example(ctx context.Context, version string, serverPort int, consolePort int) int  {
	return dag.
			Minio(version, serverPort, consolePort).
			ConsolePort(ctx)
}
@function
async def example(version: str, server_port: int, console_port: int, ) -> int:
	return await (
		dag.minio(version, server_port, console_port)
		.console_port()
	)
@func()
async example(version: string, serverPort: number, consolePort: number, ): Promise<number> {
	return dag
		.minio(version, serverPort, consolePort)
		.consolePort()
}

username() 🔗

Return Type
Secret !
Example
func (m *myModule) example(version string, serverPort int, consolePort int) *Secret  {
	return dag.
			Minio(version, serverPort, consolePort).
			Username()
}
@function
def example(version: str, server_port: int, console_port: int, ) -> dagger.Secret:
	return (
		dag.minio(version, server_port, console_port)
		.username()
	)
@func()
example(version: string, serverPort: number, consolePort: number, ): Secret {
	return dag
		.minio(version, serverPort, consolePort)
		.username()
}

password() 🔗

Return Type
Secret !
Example
func (m *myModule) example(version string, serverPort int, consolePort int) *Secret  {
	return dag.
			Minio(version, serverPort, consolePort).
			Password()
}
@function
def example(version: str, server_port: int, console_port: int, ) -> dagger.Secret:
	return (
		dag.minio(version, server_port, console_port)
		.password()
	)
@func()
example(version: string, serverPort: number, consolePort: number, ): Secret {
	return dag
		.minio(version, serverPort, consolePort)
		.password()
}

cache() 🔗

Return Type
Boolean !
Example
func (m *myModule) example(ctx context.Context, version string, serverPort int, consolePort int) bool  {
	return dag.
			Minio(version, serverPort, consolePort).
			Cache(ctx)
}
@function
async def example(version: str, server_port: int, console_port: int, ) -> bool:
	return await (
		dag.minio(version, server_port, console_port)
		.cache()
	)
@func()
async example(version: string, serverPort: number, consolePort: number, ): Promise<boolean> {
	return dag
		.minio(version, serverPort, consolePort)
		.cache()
}

server() 🔗

Server returns a Container with a Minio server ready to be started. If set, the server adds authentication with username/password (access/secret keys).

By default, the server listens on port 9000 and console on port 9001, but it can be sets to another value with methods.

Return Type
Container !
Example
func (m *myModule) example(version string, serverPort int, consolePort int) *Container  {
	return dag.
			Minio(version, serverPort, consolePort).
			Server()
}
@function
def example(version: str, server_port: int, console_port: int, ) -> dagger.Container:
	return (
		dag.minio(version, server_port, console_port)
		.server()
	)
@func()
example(version: string, serverPort: number, consolePort: number, ): Container {
	return dag
		.minio(version, serverPort, consolePort)
		.server()
}

mc() 🔗

MC returns a Minio Client.

Return Type
Mc !
Example
func (m *myModule) example(version string, serverPort int, consolePort int) *MinioMc  {
	return dag.
			Minio(version, serverPort, consolePort).
			Mc()
}
@function
def example(version: str, server_port: int, console_port: int, ) -> dag.MinioMc:
	return (
		dag.minio(version, server_port, console_port)
		.mc()
	)
@func()
example(version: string, serverPort: number, consolePort: number, ): MinioMc {
	return dag
		.minio(version, serverPort, consolePort)
		.mc()
}

mcfromContainer() 🔗

MCFromContainer use the given container as Minio client.

This is useful to configure your own minio client or execute special operation.

Return Type
Mc !
Arguments
NameTypeDefault ValueDescription
ctrContainer !-No description provided
Example
func (m *myModule) example(version string, serverPort int, consolePort int, ctr *Container) *MinioMc  {
	return dag.
			Minio(version, serverPort, consolePort).
			McfromContainer(ctr)
}
@function
def example(version: str, server_port: int, console_port: int, ctr: dagger.Container) -> dag.MinioMc:
	return (
		dag.minio(version, server_port, console_port)
		.mcfrom_container(ctr)
	)
@func()
example(version: string, serverPort: number, consolePort: number, ctr: Container): MinioMc {
	return dag
		.minio(version, serverPort, consolePort)
		.mcfromContainer(ctr)
}

Mc 🔗

ctr() 🔗

Return Type
Container !
Example
func (m *myModule) example(ctr *Container) *Container  {
	return dag.
			Minio().
			McfromContainer(ctr).
			Ctr()
}
@function
def example(ctr: dagger.Container) -> dagger.Container:
	return (
		dag.minio()
		.mcfrom_container(ctr)
		.ctr()
	)
@func()
example(ctr: Container): Container {
	return dag
		.minio()
		.mcfromContainer(ctr)
		.ctr()
}

container() 🔗

Container returns the Minio Container.

Return Type
Container !
Example
func (m *myModule) example(ctr *Container) *Container  {
	return dag.
			Minio().
			McfromContainer(ctr).
			Container()
}
@function
def example(ctr: dagger.Container) -> dagger.Container:
	return (
		dag.minio()
		.mcfrom_container(ctr)
		.container()
	)
@func()
example(ctr: Container): Container {
	return dag
		.minio()
		.mcfromContainer(ctr)
		.container()
}

aliasSet() 🔗

AliasSet adds an alias to the minio client.

Return Type
Mc !
Arguments
NameTypeDefault ValueDescription
aliasString !-No description provided
hostString !-No description provided
usernameSecret !-No description provided
passwordSecret !-No description provided
Example
func (m *myModule) example(ctr *Container, alias string, host string, username *Secret, password *Secret) *MinioMc  {
	return dag.
			Minio().
			McfromContainer(ctr).
			AliasSet(alias, host, username, password)
}
@function
def example(ctr: dagger.Container, alias: str, host: str, username: dagger.Secret, password: dagger.Secret) -> dag.MinioMc:
	return (
		dag.minio()
		.mcfrom_container(ctr)
		.alias_set(alias, host, username, password)
	)
@func()
example(ctr: Container, alias: string, host: string, username: Secret, password: Secret): MinioMc {
	return dag
		.minio()
		.mcfromContainer(ctr)
		.aliasSet(alias, host, username, password)
}

aliasRemove() 🔗

AliasRemove deletes an alias from the minio client.

Return Type
Mc !
Arguments
NameTypeDefault ValueDescription
aliasString !-No description provided
Example
func (m *myModule) example(ctr *Container, alias string) *MinioMc  {
	return dag.
			Minio().
			McfromContainer(ctr).
			AliasRemove(alias)
}
@function
def example(ctr: dagger.Container, alias: str) -> dag.MinioMc:
	return (
		dag.minio()
		.mcfrom_container(ctr)
		.alias_remove(alias)
	)
@func()
example(ctr: Container, alias: string): MinioMc {
	return dag
		.minio()
		.mcfromContainer(ctr)
		.aliasRemove(alias)
}

list() 🔗

List returns a list of all object gave at the target.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
targetString !-No description provided
Example
func (m *myModule) example(ctx context.Context, ctr *Container, target string) string  {
	return dag.
			Minio().
			McfromContainer(ctr).
			List(ctx, target)
}
@function
async def example(ctr: dagger.Container, target: str) -> str:
	return await (
		dag.minio()
		.mcfrom_container(ctr)
		.list(target)
	)
@func()
async example(ctr: Container, target: string): Promise<string> {
	return dag
		.minio()
		.mcfromContainer(ctr)
		.list(target)
}

makeBucket() 🔗

MakeBucket creates a bucket in the given target at the given path.

Return Type
Mc !
Arguments
NameTypeDefault ValueDescription
targetString !-No description provided
pathString !-No description provided
Example
func (m *myModule) example(ctr *Container, target string, path string) *MinioMc  {
	return dag.
			Minio().
			McfromContainer(ctr).
			MakeBucket(target, path)
}
@function
def example(ctr: dagger.Container, target: str, path: str) -> dag.MinioMc:
	return (
		dag.minio()
		.mcfrom_container(ctr)
		.make_bucket(target, path)
	)
@func()
example(ctr: Container, target: string, path: string): MinioMc {
	return dag
		.minio()
		.mcfromContainer(ctr)
		.makeBucket(target, path)
}

copyFile() 🔗

CopyFile adds the given file to the path given in the target.

Return Type
Mc !
Arguments
NameTypeDefault ValueDescription
fileFile !-No description provided
targetString !-No description provided
pathString !-No description provided
Example
func (m *myModule) example(ctr *Container, file *File, target string, path string) *MinioMc  {
	return dag.
			Minio().
			McfromContainer(ctr).
			CopyFile(file, target, path)
}
@function
def example(ctr: dagger.Container, file: dagger.File, target: str, path: str) -> dag.MinioMc:
	return (
		dag.minio()
		.mcfrom_container(ctr)
		.copy_file(file, target, path)
	)
@func()
example(ctr: Container, file: File, target: string, path: string): MinioMc {
	return dag
		.minio()
		.mcfromContainer(ctr)
		.copyFile(file, target, path)
}

copyDir() 🔗

CopyDir adds the given directory to the path given in the target.

Return Type
Mc !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-No description provided
targetString !-No description provided
pathString !-No description provided
Example
func (m *myModule) example(ctr *Container, dir *Directory, target string, path string) *MinioMc  {
	return dag.
			Minio().
			McfromContainer(ctr).
			CopyDir(dir, target, path)
}
@function
def example(ctr: dagger.Container, dir: dagger.Directory, target: str, path: str) -> dag.MinioMc:
	return (
		dag.minio()
		.mcfrom_container(ctr)
		.copy_dir(dir, target, path)
	)
@func()
example(ctr: Container, dir: Directory, target: string, path: string): MinioMc {
	return dag
		.minio()
		.mcfromContainer(ctr)
		.copyDir(dir, target, path)
}

exec() 🔗

Exec returns the result of the given command.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
command[String ! ] !-No description provided
Example
func (m *myModule) example(ctx context.Context, ctr *Container, command []string) string  {
	return dag.
			Minio().
			McfromContainer(ctr).
			Exec(ctx, command)
}
@function
async def example(ctr: dagger.Container, command: List[str]) -> str:
	return await (
		dag.minio()
		.mcfrom_container(ctr)
		.exec(command)
	)
@func()
async example(ctr: Container, command: string[]): Promise<string> {
	return dag
		.minio()
		.mcfromContainer(ctr)
		.exec(command)
}