module-template

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README ยถ

Module ModuleTemplate for Dagger

Dagger Version

A simple Dagger place the description of the module here

Configuration ๐Ÿ› ๏ธ

Through the Dagger CLI, or by using it directly within your module, you can configure the following options:

  • โš™๏ธ ctr: The container to use as a base container. If not specified, a new container is created.
  • โš™๏ธ version: The version of the Go image to use. Defaults to latest.
  • โš™๏ธ image: The Go image to use. Defaults to golang:alpine.

Features ๐ŸŽจ

Command or functionality Command Example Status
Add your feature here run dagger call <my function> โœ…

Using the ModuleTemplate Module ๐Ÿš€

Place the description of the module here


Usage through the Dagger CLI ๐Ÿš€

List all the functions available in the module:

# enter into the module's directory
cd module-template

# list all the functions available in the module
dagger develop && dagger functions

Call a function:

# call a function
# dagger call <function-name> [arguments]
dagger call github.com/excoriate/daggerverse/module-template@version <function-name> [arguments]

Testing ๐Ÿงช

This module includes a testing module that aims to test the functionality of the ModuleTemplate module. The tests are written in Go and can be run using the following command:

## Run the tests using the just command
just test module-template

Developer Experience ๐Ÿ› ๏ธ

If you'd like to contribute, mostly we use Just to automate tasks and Nix to manage the development environment. You can use the following commands to get started:

# initialize the pre-commit hooks
just init
# run CI or common things locally
just golint module-template
# run the tests
just test module-template
# Run the entire CI tasks locally
just cilocal module-template

Additionally, this module brings a new Daggerverse functionality that allows to automatically generate the module's documentation using an special (sub) module called examples/. This module contains a set of examples hat demonstrate how to use the module's functions. To generate the documentation

NOTE: The just command entails the use of the Justfile for task automation. If you don't have it, don't worry, you just need Nix to run the tasks using the dev-shell built-in command: nix develop --impure --extra-experimental-features nix-command --extra-experimental-features flakes

Documentation ยถ

Overview ยถ

Package main provides methods for setting up and managing a container environment. This includes setting environment variables, mounting directories and files, and configuring services such as Docker within the container.

Copyright: Excoriate alex_torres@outlook.com License: MIT

Package main provides utility functions for working with Docker containers.

This package includes constants and a function for getting the Docker-in-Docker image.

Copyright: Excoriate License: Apache-2.0

Package main provides the ModuleTemplate Dagger module and related functions.

This module has been generated via dagger init and serves as a reference to basic module structure as you get started with Dagger. The module demonstrates usage of arguments and return types using simple echo and grep commands. The functions can be called from the dagger CLI or from one of the SDKs.

The first line in this comment block is a short description line and the rest is a long description with more detail on the module's purpose or usage, if appropriate. All modules should have a short description.

Directories ยถ

Path Synopsis
examples
go module
tests module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL