ttnmage

package
v0.0.0-...-dc85330 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init initializes the tooling.

Types

type Cli

type Cli mg.Namespace

Cli namespace.

func (Cli) Autocomplete

func (Cli) Autocomplete() error

Autocomplete generates scripts for auto-completion.

type Dev

type Dev mg.Namespace

Dev namespace.

func (Dev) Certificates

func (Dev) Certificates() error

Certificates generates certificates for development.

func (Dev) DBCreate

func (Dev) DBCreate() error

DBCreate creates the SQL databases used for unit tests.

func (Dev) DBErase

func (Dev) DBErase() error

DBErase erases the databases of the development environment.

func (Dev) DBRedisCli

func (Dev) DBRedisCli() error

DBRedisCli starts a Redis-CLI shell.

func (Dev) DBSQL

func (Dev) DBSQL() error

DBSQL starts an SQL shell.

func (Dev) DBStart

func (Dev) DBStart() error

DBStart starts the databases of the development environment.

func (Dev) DBStop

func (Dev) DBStop() error

DBStop stops the databases of the development environment.

func (Dev) GenGatewayCA

func (Dev) GenGatewayCA() error

GenGatewayCA generates a certificate authority to sign gateway certificates.

func (Dev) GenGatewayCerts

func (Dev) GenGatewayCerts() error

GenGatewayCerts generates a client certificates for the EUI.

func (Dev) InitDeviceRepo

func (Dev) InitDeviceRepo() error

InitDeviceRepo initializes the device repository.

func (Dev) InitStack

func (Dev) InitStack() error

InitStack initializes the Stack.

func (Dev) Misspell

func (Dev) Misspell() error

Misspell fixes common spelling mistakes in files.

func (Dev) RedisFlush

func (Dev) RedisFlush() error

RedisFlush deletes all keys from redis.

func (Dev) SQLDump

func (Dev) SQLDump() error

SQLDump performs an SQL database dump of the dev database to the .cache folder.

func (Dev) SQLRestore

func (Dev) SQLRestore() error

SQLRestore restores the dev database using a previously generated dump.

func (Dev) SQLStart

func (Dev) SQLStart() error

SQLStart starts the SQL database of the development environment.

func (Dev) SQLStop

func (Dev) SQLStop() error

SQLStop stops the SQL database of the development environment.

func (Dev) StartDevStack

func (Dev) StartDevStack() error

StartDevStack starts TTS in end-to-end test configuration.

type Git

type Git mg.Namespace

Git namespace.

func (Git) Diff

func (Git) Diff() error

Diff returns error if `git diff` is not empty

func (Git) InstallHooks

func (g Git) InstallHooks() error

InstallHooks installs git hooks that help developers follow our best practices.

func (Git) PullSubmodules

func (Git) PullSubmodules() error

PullSubmodules pulls in submodule updates.

func (Git) RunHook

func (g Git) RunHook() error

RunHook runs the Git hook for $HOOK. - standard input contents are taken from $STDIN - arguments are taken from $ARGS

func (Git) UninstallHooks

func (g Git) UninstallHooks() error

UninstallHooks uninstalls git hooks.

func (Git) UpdateSubmodules

func (Git) UpdateSubmodules() error

UpdateSubmodules updates submodules, and initializes them when necessary.

type Go

type Go mg.Namespace

Go namespace.

func (Go) CheckVersion

func (Go) CheckVersion() error

CheckVersion checks the installed Go version against the minimum version we support.

func (Go) Cover

func (Go) Cover() error

Cover tests all Go packages and writes test coverage into the coverage file.

func (Go) Coveralls

func (g Go) Coveralls() error

Coveralls sends the test coverage to Coveralls.

func (Go) EventData

func (Go) EventData() error

EventData builds the file with event data.

func (Go) Fmt

func (g Go) Fmt() error

Fmt formats and simplifies all Go files.

func (Go) Generate

func (Go) Generate() error

Generate runs go generate.

func (Go) Lint

func (g Go) Lint() error

Lint lints all Go files.

func (Go) Messages

func (Go) Messages() error

Messages builds the file with translatable messages in Go code.

func (Go) Quality

func (g Go) Quality()

Quality runs code quality checks on Go files.

func (Go) Test

func (Go) Test() error

Test tests all Go packages.

func (Go) TestBinaries

func (Go) TestBinaries() error

TestBinaries tests the Go binaries by executing them with the --help flag.

type HeaderConfig

type HeaderConfig struct {
	Rules []*HeaderRule `yaml:"rules"`
}

HeaderConfig is the format of the header configuration file.

type HeaderRule

type HeaderRule struct {
	Include []string `yaml:"include"`
	Exclude []string `yaml:"exclude"`
	Header  string   `yaml:"header"`

	Prefix string `yaml:"prefix"`
	// contains filtered or unexported fields
}

HeaderRule in the header config file.

type Headers

type Headers mg.Namespace

Headers namespace.

func (Headers) Check

func (h Headers) Check() error

Check checks that all files contain the required file header.

func (Headers) CheckNewFiles

func (h Headers) CheckNewFiles() error

CheckNewFiles checks that all new files contain the required file header with the correct year.

type Js

type Js mg.Namespace

Js namespace.

func (Js) BackendTranslations

func (js Js) BackendTranslations() error

BackendTranslations builds the backend locale files.

func (Js) Build

func (js Js) Build() error

Build runs the webpack command with the project config.

func (Js) BuildDll

func (js Js) BuildDll() error

BuildDll runs the webpack command to build the DLL bundle

func (Js) Clean

func (js Js) Clean() error

Clean clears all generated files.

func (Js) CleanDeps

func (js Js) CleanDeps() error

CleanDeps removes all installed node packages (rm -rf node_modules).

func (Js) CypressHeadless

func (js Js) CypressHeadless() error

CypressHeadless runs the Cypress end-to-end tests in the headless mode.

func (Js) CypressInteractive

func (js Js) CypressInteractive() error

CypressInteractive runs the Cypress end-to-end tests in interactive mode.

func (Js) Deps

func (js Js) Deps() error

Deps installs the javascript dependencies.

func (Js) ExtractLocaleFiles

func (js Js) ExtractLocaleFiles() error

ExtractLocaleFiles extracts the locale files from the babel message files.

func (Js) Fmt

func (js Js) Fmt() error

Fmt formats all js files.

func (Js) Lint

func (js Js) Lint() error

Lint runs eslint over frontend js files.

func (Js) LintAll

func (js Js) LintAll()

LintAll runs linters over js and snap files.

func (Js) LintSnap

func (js Js) LintSnap() error

LintSnap runs eslint over frontend snap files.

func (Js) Messages

func (js Js) Messages() error

Messages extracts the frontend messages via babel.

func (Js) Serve

func (js Js) Serve() error

Serve runs webpack-dev-server.

func (Js) Storybook

func (js Js) Storybook() error

Storybook runs a local server with storybook.

func (Js) Test

func (js Js) Test() error

Test runs frontend jest tests.

func (Js) Translations

func (js Js) Translations()

Translations writes the babel message files and converts them into locale files.

func (Js) Vulnerabilities

func (js Js) Vulnerabilities() error

Vulnerabilities runs yarn audit to check for vulnerable node packages.

type JsSDK

type JsSDK mg.Namespace

JsSDK namespace.

func (JsSDK) AllowedFieldMaskPaths

func (k JsSDK) AllowedFieldMaskPaths() error

AllowedFieldMaskPaths builds the allowed field masks file based on the ttnpb package.

func (JsSDK) Build

func (k JsSDK) Build() error

Build builds the source files and output into 'dist'.

func (JsSDK) Clean

func (k JsSDK) Clean()

Clean clears all transpiled files.

func (JsSDK) CleanDeps

func (JsSDK) CleanDeps()

CleanDeps removes all installed node packages (rm -rf node_modules).

func (JsSDK) Definitions

func (k JsSDK) Definitions() error

Definitions extracts the api-definition.json from the proto generated api.json.

func (JsSDK) DefinitionsClean

func (k JsSDK) DefinitionsClean(context.Context) error

DefinitionsClean removes the generated api-definition.json.

func (JsSDK) Deps

func (k JsSDK) Deps() error

Deps installs the javascript SDK dependencies.

func (JsSDK) DeviceFieldMasks

func (k JsSDK) DeviceFieldMasks() error

DeviceFieldMasks generates end device entity map.

func (JsSDK) Fmt

func (k JsSDK) Fmt() error

Fmt formats all js files.

func (JsSDK) Lint

func (k JsSDK) Lint() error

Lint runs eslint over sdk js files.

func (JsSDK) Test

func (k JsSDK) Test() error

Test runs jest unit tests.

func (JsSDK) TestWatch

func (k JsSDK) TestWatch() error

TestWatch runs jest unit tests in watch mode.

func (JsSDK) Watch

func (k JsSDK) Watch() error

Watch builds the source files in watch mode.

type Proto

type Proto mg.Namespace

Proto namespace.

func (Proto) All

func (p Proto) All(ctx context.Context)

All generates protos.

func (Proto) Clean

func (p Proto) Clean(ctx context.Context)

Clean removes generated protos.

func (Proto) Fmt

func (p Proto) Fmt(ctx context.Context) error

Fmt formats and simplifies all proto files.

func (Proto) Go

func (p Proto) Go(context.Context) error

Go generates Go protos.

func (Proto) GoClean

func (p Proto) GoClean(context.Context) error

GoClean removes generated Go protos.

func (Proto) JsSDK

func (p Proto) JsSDK(context.Context) error

JsSDK generates javascript SDK protos.

func (Proto) JsSDKClean

func (p Proto) JsSDKClean(context.Context) error

JsSDKClean removes generated javascript SDK protos.

func (Proto) Lint

func (p Proto) Lint(ctx context.Context) error

Lint lints all proto files.

func (Proto) Markdown

func (p Proto) Markdown(context.Context) error

Markdown generates Markdown protos.

func (Proto) MarkdownClean

func (p Proto) MarkdownClean(context.Context) error

MarkdownClean removes generated Markdown protos.

func (Proto) Swagger

func (p Proto) Swagger(context.Context) error

Swagger generates Swagger protos.

func (Proto) SwaggerClean

func (p Proto) SwaggerClean(context.Context) error

SwaggerClean removes generated Swagger protos.

type SQL

type SQL mg.Namespace

Sql namespace

func (SQL) Fmt

func (SQL) Fmt(context.Context) error

Fmt formats all .sql files

type Version

type Version mg.Namespace

Version namespace.

func (Version) Files

func (Version) Files() error

Files writes given version to files that contain version info

Jump to

Keyboard shortcuts

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