-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,014 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT | ||
|
||
resource "local_file" "telemetry" { | ||
content = <<-EOT | ||
package telemetry // import "github.com/terramate-io/terramate/cmd/terramate/cli/telemetry" | ||
var DefaultRecord = NewRecord() | ||
func Endpoint() url.URL | ||
func GenerateOrReadSignature(cpsigfile, anasigfile string) (string, bool) | ||
func GenerateSignature() string | ||
func ReadSignature(p string) string | ||
func SendMessage(msg *Message, p SendMessageParams) <-chan error | ||
type AuthType int | ||
const AuthNone AuthType = iota ... | ||
func DetectAuthTypeFromEnv(credpath string) AuthType | ||
type Message struct{ ... } | ||
type MessageOpt func(msg *Message) | ||
func BoolFlag(name string, flag bool, ifCmds ...string) MessageOpt | ||
func Command(cmd string) MessageOpt | ||
func DetectFromEnv(cmd string, credfile, cpsigfile, anasigfile string) MessageOpt | ||
func StringFlag(name string, flag string, ifCmds ...string) MessageOpt | ||
type PlatformType int | ||
const PlatformLocal PlatformType = iota ... | ||
func DetectPlatformFromEnv() PlatformType | ||
type Record struct{ ... } | ||
func NewRecord() *Record | ||
type SendMessageParams struct{ ... } | ||
EOT | ||
|
||
filename = "${path.module}/mock-telemetry.ignore" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2023 Terramate GmbH | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
//go:build !localhostEndpoints | ||
|
||
package telemetry | ||
|
||
import ( | ||
"net/url" | ||
) | ||
|
||
func Endpoint() url.URL { | ||
var u url.URL | ||
u.Scheme = "https" | ||
u.Host = "analytics.terramate.io" | ||
u.Path = "/" | ||
return u | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2023 Terramate GmbH | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
//go:build localhostEndpoints | ||
|
||
package telemetry | ||
|
||
import ( | ||
"net/url" | ||
) | ||
|
||
func Endpoint() url.URL { | ||
var u url.URL | ||
u.Scheme = "http" | ||
u.Host = "localhost:3000" | ||
u.Path = "/" | ||
return u | ||
} |
Oops, something went wrong.