{"modulePath":"github.com/rigdev/rig","version":"v1.12.7","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package utils\n\n## Variables\n\n```go\nvar DefaultResources = \u0026capsule.Resources{\n\tRequests: \u0026capsule.ResourceList{\n\t\tCpuMillis:   200,\n\t\tMemoryBytes: 512_000_000,\n\t},\n\tLimits: \u0026capsule.ResourceList{\n\t\tCpuMillis:   0,\n\t\tMemoryBytes: 0,\n\t},\n}\n```\n\n```go\nvar ErrFileIsTooLarge = errors.InvalidArgumentErrorf(\"file exceeds maximum file size\")\n```\n\n```go\nvar ErrInvalidUpdatedAt = errors.InvalidArgumentErrorf(\"invalid updated at timestamp\")\n```\n\n## Functions\n\n```go\nfunc ErrorEqual(t *testing.T, expected error, err error)\n```\n\n```go\nfunc FeedDefaultResources(r *capsule.Resources)\n```\n\n```go\nfunc GetData(stream interface {\n\tReceive() ([]byte, error)\n}, maxSize int,\n) ([]byte, error)\n```\n\n```go\nfunc GetExponentialBackoff(backoff float64, factor float64) time.Duration\n```\n\n```go\nfunc GetIdentifierFromIdentifier(userID uuid.UUID) (string, string)\n```\n\n```go\nfunc ImageExistsNatively(ctx context.Context, dc *client.Client, image string) (bool, string, error)\n```\n\n```go\nfunc Retry(amount int, dur time.Duration, x func() error) error\n```\n\n```go\nfunc UserIdentifier(u *user.User) string\n```\n\n```go\nfunc UserName(u *user.User) string\n```\n\n```go\nfunc ValiateConfigFilePath(p string) error\n```\nvalid path: 1. absolute 2. no trailing slash 3. no not escaped whitespace 4. no double slashes 5. no dots 6. non-empty\n\n```go\nfunc ValidateEmail(email string) error\n```\n\n```go\nfunc ValidatePassword(password string) error\n```\n\n```go\nfunc ValidatePhone(phone string) error\n```\n\n```go\nfunc ValidateURLPath(p string) error\n```\nValidateURLPath validates the Path segment of an URL is correct [https://datatracker.ietf.org/doc/html/rfc3986#section-3.3](https://datatracker.ietf.org/doc/html/rfc3986#section-3.3)\n\n```go\nfunc WordWrap(s string, width int, indent string) string\n```\n\n## Types\n\n```go\ntype DataReceive func() ([]byte, error)\n```\n\n```go\nfunc (d DataReceive) Receive() ([]byte, error)\n```\n\n","path":"github.com/rigdev/rig/pkg/utils","name":"utils","synopsis":"","isRedistributable":true}
