Standard library

CUE v0.18.0

Functions, schemas, and constants provided by CUE’s builtin packages.

Packages · 33

crypto/ed25519
crypto/hmacPackage hmac implements the Keyed-Hash Message Authentication Code (HMAC) as defined in U.S. Federal Information Processing Standards Publication 198. An HMAC is a cryptographic hash that uses a key to sign a message. The receiver verifies the hash by recomputing it using the same key.
crypto/md5
crypto/sha1
crypto/sha256
crypto/sha512
encoding/base64Package base64 implements base64 encoding as specified by RFC 4648.
encoding/csv
encoding/hex
encoding/json
encoding/openapiPackage openapi provides OpenAPI encoding and decoding functionality. This is an EXPERIMENTAL API.
encoding/toml
encoding/yaml
html
listPackage list contains functions for manipulating and examining lists.
math
math/bits
netPackage net provides net-related type definitions. The IP-related definitions can be represented as either a string or a list of byte values. To allow one format over an other these types can be further constraint using string or [...]. For instance, // multicast defines a multicast IP address in string form. multicast: net.MulticastIP & string // unicast defines a global unicast IP address in list form. unicast: net.GlobalUnicastIP & [...]
pathPackage path implements utility routines for manipulating filename paths as defined by targetted operating systems, and also paths that always use forward slashes regardless of the operating system, such as URLs.
regexpPackage regexp implements regular expression search. The syntax of the regular expressions accepted is the same general syntax used by Perl, Python, and other languages. More precisely, it is the syntax accepted by RE2 and described at https://golang.org/s/re2syntax, except for \C. For an overview of the syntax, run go doc regexp/syntax The regexp implementation provided by this package is guaranteed to run in time linear in the size of the input. (This is a property not guaranteed by most open source implementations of regular expressions.) For more information about this property, see https://swtch.com/~rsc/regexp/regexp1.html or any book about automata theory. All characters are UTF-8-encoded code points. The regexp package functions match a regular expression and identify the matched text. Their names are matched by this regular expression: Find(All)?(Submatch)? If 'All' is present, the routine matches successive non-overlapping matches of the entire expression. Empty matches abutting a preceding match are ignored. The return value is a slice containing the successive return values of the corresponding non-'All' routine. These routines take an extra integer argument, n. If n >= 0, the function returns at most n matches/submatches; otherwise, it returns all of them. If 'Submatch' is present, the return value is a slice identifying the successive submatches of the expression. Submatches are matches of parenthesized subexpressions (also known as capturing groups) within the regular expression, numbered from left to right in order of opening parenthesis. Submatch 0 is the match of the entire expression, submatch 1 the match of the first parenthesized subexpression, and so on.
strconv
stringsPackage strings implements simple functions to manipulate UTF-8 encoded strings. Some of the functions in this package are specifically intended as field constraints. For instance, MaxRunes as used in this CUE program import "strings" myString: strings.MaxRunes(5) specifies that the myString should be at most 5 code points.
structPackage struct defines utilities for struct types.
text/tabwriter
text/template
timePackage time defines time-related types. In CUE time values are represented as a string of the format time.RFC3339Nano.
toolPackage tool defines stateful operation types for cue commands. This package is only visible in cue files with a _tool.cue or _tool_test.cue ending. It cannot be imported as a regular package; its declarations form the schema of the top-level "command" map of tool files.
tool/cliPackage cli provides tasks dealing with a console. These are the supported tasks:
tool/execPackage exec defines tasks for running commands. These are the supported tasks:
tool/filePackage file provides file operations for cue tasks. These are the supported tasks:
tool/httpPackage http provides tasks related to the HTTP protocol. These are the supported tasks:
tool/osPackage os defines tasks for retrieving os-related information. CUE definitions:
uuidPackage uuid defines functionality for creating UUIDs as defined in RFC 4122. Currently only Version 5 (SHA1) and Version 3 (MD5) are supported.
Install CUE