stdlib: added package doc strings

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-06-15 10:46:56 +02:00
parent 36b287c9d5
commit 9281967e16
23 changed files with 66 additions and 24 deletions

View File

@ -1,3 +1,4 @@
// Base package for Alpine Linux
package alpine
import (
@ -6,6 +7,7 @@ import (
let defaultVersion = "3.13.5@sha256:69e70a79f2d41ab5d637de98c1e0b055206ba40a8145e7bddb55ccc04e13cf8f"
// Base image for Alpine Linux
#Image: {
package: [string]: true | false | string
version: string | *defaultVersion

View File

@ -1,3 +1,4 @@
// AWS base package
package aws
import (
@ -6,7 +7,7 @@ import (
"dagger.io/alpine"
)
// Base AWS Config
// AWS Config shared by all AWS packages
#Config: {
// AWS region
region: string @dagger(input)

View File

@ -1,3 +1,4 @@
// AWS Cloud Formation
package cloudformation
import (

View File

@ -1,3 +1,4 @@
// Amazon Elastic Container Registry (ECR)
package ecr
import (

View File

@ -1,10 +1,11 @@
// AWS Elastic Container Service (ECS)
package ecs
import (
"dagger.io/aws"
)
// RunTask implement ecs run-task
// RunTask implements ecs run-task for running a single container on ECS
#RunTask: {
// AWS Config

View File

@ -1,3 +1,4 @@
// AWS Elastic Kubernetes Service (EKS)
package eks
import (

View File

@ -1,3 +1,4 @@
// AWS Elastic Load Balancer (ELBv2)
package elb
import (
@ -5,7 +6,7 @@ import (
"dagger.io/aws"
)
// Returns a non-taken rule priority (randomized)
// Returns an unused rule priority (randomized in available range)
#RandomRulePriority: {
// AWS Config
config: aws.#Config

View File

@ -1,3 +1,4 @@
// AWS Relational Database Service (RDS)
package rds
import (
@ -6,6 +7,7 @@ import (
"dagger.io/aws"
)
// Creates a new Database on an existing RDS Instance
#CreateDB: {
// AWS Config
config: aws.#Config
@ -19,6 +21,7 @@ import (
// ARN of the database secret (for connecting via rds api)
secretArn: string @dagger(input)
// Database type MySQL or PostgreSQL (Aurora Serverless only)
dbType: "mysql" | "postgres" @dagger(input)
// Name of the DB created
@ -79,6 +82,7 @@ import (
}
}
// Creates a new user credentials on an existing RDS Instance
#CreateUser: {
// AWS Config
config: aws.#Config
@ -95,8 +99,10 @@ import (
// ARN of the database secret (for connecting via rds api)
secretArn: string @dagger(input)
// Name of the database to grants access to
grantDatabase: string | *"" @dagger(input)
// Database type MySQL or PostgreSQL (Aurora Serverless only)
dbType: "mysql" | "postgres" @dagger(input)
// Outputed username
@ -185,6 +191,7 @@ import (
}
}
// Fetches information on an existing RDS Instance
#Instance: {
// AWS Config
config: aws.#Config

View File

@ -1,3 +1,4 @@
// AWS Simple Storage Service
package s3
import (
@ -6,7 +7,7 @@ import (
"dagger.io/aws"
)
// S3 file or Directory upload
// S3 Bucket upload (file or directory)
#Put: {
// AWS Config
@ -91,7 +92,7 @@ import (
}
}
// S3 Sync
// S3 Bucket sync
#Sync: {
// AWS Config
config: aws.#Config

View File

@ -6,7 +6,6 @@ import (
// An artifact such as source code checkout, container image, binary archive...
// May be passed as user input, or computed by a buildkit pipeline
#Artifact: {
@dagger(artifact)
#up: [...op.#Op]

View File

@ -1,3 +1,4 @@
// Docker container operations
package docker
import (
@ -102,7 +103,10 @@ import (
// Build a Docker image from the provided Dockerfile contents
// FIXME: incorporate into #Build
#ImageFromDockerfile: {
// Dockerfile passed as a string
dockerfile: string @dagger(input)
// Build context
context: dagger.#Artifact @dagger(input)
#up: [

View File

@ -1,3 +1,4 @@
// Google Cloud Platform
package gcp
import (

View File

@ -1,3 +1,4 @@
// Google Container Registry
package gcr
import (

View File

@ -1,3 +1,4 @@
// Google Kubernetes Engine
package gke
import (

View File

@ -1,3 +1,4 @@
// Git operations
package git
import (
@ -35,7 +36,11 @@ import (
// Get the name of the current checked out branch or tag
#CurrentBranch: {
// Git repository
repository: dagger.#Artifact @dagger(input)
// Git branch name
name: {
string
@dagger(output)
@ -74,7 +79,11 @@ import (
// List tags of a repository
#Tags: {
// Git repository
repository: dagger.#Artifact @dagger(input)
// Repository tags
tags: {
[...string]
@dagger(output)

View File

@ -1,3 +1,4 @@
// Go build operations
package go
import (
@ -10,8 +11,11 @@ import (
// A standalone go environment
#Container: {
// Go version to use
version: *"1.16" | string @dagger(input)
// Source code
source: dagger.#Artifact @dagger(input)
os.#Container & {
@ -36,6 +40,7 @@ import (
}
}
// Re-usable component for the Go compiler
#Go: {
// Go version to use
version: *"1.16" | string @dagger(input)
@ -70,6 +75,7 @@ import (
]
}
// Go application builder
#Build: {
// Go version to use
version: *#Go.version | string @dagger(input)
@ -95,6 +101,7 @@ import (
// Specify the targeted binary name
output: string @dagger(output)
// Environment variables
env: {
[string]: string @dagger(input)
}

View File

@ -1,3 +1,4 @@
// IO operations
package io
// Standard interface for directory operations in cue
@ -13,8 +14,10 @@ package io
...
}
// Standard ReadWriter interface
#ReadWriter: #Reader & #Writer
// Standard Reader interface
#Reader: {
read: {
// FIXME: support different data schemas for different formats
@ -26,6 +29,7 @@ package io
...
}
// Standard Writer interface
#Writer: {
write: *null | {
// FIXME: support writing in multiple formats

View File

@ -9,7 +9,7 @@ import (
"dagger.io/os"
)
// A Yarn package.
// A Yarn package
#Package: {
// Application source code
source: dagger.#Artifact @dagger(input)
@ -28,11 +28,11 @@ import (
} @dagger(input)
// Write the contents of `environment` to this file,
// in the "envfile" format.
// in the "envfile" format
writeEnvFile: string | *"" @dagger(input)
// Read build output from this directory
// (path must be relative to working directory).
// (path must be relative to working directory)
buildDir: string | *"build" @dagger(input)
// Run this yarn script
@ -41,6 +41,7 @@ import (
// Optional arguments for the script
args: [...string] | *[] @dagger(input)
// Build output directory
build: os.#Dir & {
from: ctr
path: "/build"

View File

@ -1,3 +1,4 @@
// Kubernetes client operations
package kubernetes
import (
@ -6,8 +7,10 @@ import (
"dagger.io/alpine"
)
// Kubectl client
#Kubectl: {
// Kubectl version
version: *"v1.19.9" | string
#code: #"""

View File

@ -1,3 +1,4 @@
// Kustomize config management
package kustomize
import (

View File

@ -1,3 +1,4 @@
// Netlify client operations
package netlify
import (
@ -6,7 +7,7 @@ import (
"dagger.io/os"
)
// A Netlify account
// Netlify account credentials
#Account: {
// Use this Netlify account name
// (also referred to as "team" in the Netlify docs)
@ -16,7 +17,7 @@ import (
token: dagger.#Secret @dagger(input)
}
// A Netlify site
// Netlify site
#Site: {
// Netlify account this site is attached to
account: #Account

View File

@ -1,16 +1,4 @@
// Random generation utilities.
//
// Example:
//
// ```cue
// str: random.#String & {
// seed: "str"
// length: 10
// }
// ```
//
//
//
// Random generation utilities
package random
import (

View File

@ -1,3 +1,4 @@
// Terraform operations
package terraform
import (
@ -7,15 +8,20 @@ import (
"dagger.io/dagger/op"
)
// Terraform configuration
#Configuration: {
// Terraform version
version: string | *"latest" @dagger(input)
// Source configuration
source: dagger.#Artifact @dagger(input)
tfvars?: {
...
}
// Environment variables
env: {
[string]: string @dagger(input)
}