meta

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VcnLoginEvent       string = "VCN_LOGIN"
	VcnSignEvent        string = "VCN_SIGN"
	VcnVerifyEvent      string = "VCN_VERIFY"
	VcnAlertVerifyEvent string = "VCN_ALERT_VERIFY"
)

Event tracking related consts

View Source
const (
	VcnUserEnv                   string = "VCN_USER"
	VcnPasswordEnv               string = "VCN_PASSWORD"
	VcnNotarizationPassword      string = "VCN_NOTARIZATION_PASSWORD"
	VcnNotarizationPasswordEmpty string = "VCN_NOTARIZATION_PASSWORD_EMPTY"
	VcnOtp                       string = "VCN_OTP"
	VcnOtpEmpty                  string = "VCN_OTP_EMPTY"
	VcnLcApiKey                  string = "VCN_LC_API_KEY"
	VcnLcHost                    string = "VCN_LC_HOST"
	VcnLcPort                    string = "VCN_LC_PORT"
	VcnLcCert                    string = "VCN_LC_CERT"
	VcnLcNoTls                   string = "VCN_LC_NO_TLS"
	VcnLcSkipTlsVerify           string = "VCN_LC_SKIP_TLS_VERIFY"
	VcnSigningPubKeyFile         string = "VCN_SIGNING_PUB_KEY_FILE"
)

vcn environment variable names

View Source
const AttachmentSeparator = ".attach."
View Source
const BomEntryKeyName string = "BOM"
View Source
const DateShortForm = "2006/1/2-15:04:05"
View Source
const IndexDateRangePrefix = "_INDEX.ITEM.INSERTION-DATE."
View Source
const VcnAttachmentLabelPrefix string = "_ITEM.ATTACH.LABEL"
View Source
const VcnDefaultExitCode = 0
View Source
const VcnEnforceSignatureVerifyDesc string = "if this flag is provided vcn will disable signature auto trusting when connecting to a new Codenotary Cloud server"
View Source
const VcnExitCode string = "override default exit codes in case of success"
View Source
const VcnLCCmdHeaderName = "vcn-command"
View Source
const VcnLCLedgerHeaderName string = "lc-ledger"
View Source
const VcnLCNotarizeCmdHeaderValue = "notarize"
View Source
const VcnLCPluginTypeHeaderName string = "lc-plugin-type"

Ledger compliance

View Source
const VcnLCPluginTypeHeaderValue string = "vcn"
View Source
const VcnLCVerifyCmdHeaderValue = "verify"
View Source
const VcnLCVersionHeaderName string = "version"
View Source
const VcnLcApiKeyDesc string = "Codenotary Cloud server api key"
View Source
const VcnLcAttachDesc string = "" /* 385-byte string literal not displayed */
View Source
const VcnLcAttachmentAuthDesc string = `` /* 286-byte string literal not displayed */
View Source
const VcnLcCIAttribDesc string = "detect CI environment variables context if presents and inject "
View Source
const VcnLcCertPathDesc string = "local or absolute path to a certificate file needed to set up tls connection to a Codenotary Cloud server"
View Source
const VcnLcForceAttachmentDownloadDesc string = "if provided when downloading attachments files are silently overwritten"
View Source
const VcnLcHostFlagDesc string = "if set with host, action will be route to a Codenotary Cloud server"
View Source
const VcnLcLedgerDesc string = "Codenotary Cloud ledger. Required when a multi-ledger API key is used."
View Source
const VcnLcNoTlsDesc string = "allow insecure connections when connecting to a Codenotary Cloud server"
View Source
const VcnLcPortFlagDesc string = "" /* 127-byte string literal not displayed */
View Source
const VcnLcSkipTlsVerifyDesc string = "disables tls certificate verification when connecting to a Codenotary Cloud server"
View Source
const VcnLcUidDesc string = "authenticate on a specific artifact uid"
View Source
const VcnPrefix string = "vcn"
View Source
const VcnSigningPubKeyDesc string = "" /* 206-byte string literal not displayed */
View Source
const VcnSigningPubKeyFileName = ".vcn-trusted-signing-pub-key"
View Source
const VcnSigningPubKeyFileNameDesc string = "" /* 312-byte string literal not displayed */

Variables

This section is empty.

Functions

func APIEndpoint added in v0.6.0

func APIEndpoint(resource string) string

APIEndpoint returns the API's endpoint URL for a given resource.

func AssetsRelayContractAddress

func AssetsRelayContractAddress() string

AssetsRelayContractAddress returns the AssetsRelay smart contract public address.

func DashboardURL

func DashboardURL() string

DashboardURL returns the CodeNotary's dashboard URL.

func GasLimit

func GasLimit() uint64

GasLimit for transactions.

func GasPrice

func GasPrice() *big.Int

GasPrice for transactions.

func GitRevision added in v0.7.0

func GitRevision() string

GitRevision returns the current CodeNotary vcn git revision string

func MainNet added in v0.6.0

func MainNet() string

MainNet returns the CodeNotary mainnet URL.

func OrganisationsRelayContractAddress

func OrganisationsRelayContractAddress() string

OrganisationsRelayContractAddress returns the OrganisationsRelay smart contract public address.

func PollInterval

func PollInterval() time.Duration

PollInterval returns the waiting time between each round. See TxVerificationRounds().

func StaticBuild added in v0.8.2

func StaticBuild() bool

StaticBuild returns when the current vcn executable has been statically linked against libraries

func StatusColor

func StatusColor(status Status) (color.Attribute, color.Attribute, color.Attribute)

StatusColor returns color.Attribute(s) for the given status

func StatusNameStyled

func StatusNameStyled(status Status) string

StatusNameStyled returns the colorized name of the given status as string

func StyleAffordance

func StyleAffordance() (color.Attribute, color.Attribute, color.Attribute)

StyleAffordance returns color.Attribute(s) for affordance messages

func StyleError

func StyleError() (color.Attribute, color.Attribute, color.Attribute)

StyleError returns color.Attribute(s) for error messages

func StyleSuccess

func StyleSuccess() (color.Attribute, color.Attribute, color.Attribute)

StyleSuccess returns color.Attribute(s) for success messages

func StyleWarning

func StyleWarning() (color.Attribute, color.Attribute, color.Attribute)

StyleWarning returns color.Attribute(s) for warning messages

func TxVerificationRounds

func TxVerificationRounds() uint64

TxVerificationRounds returns the maximum number of rounds to try before considering a pending transaction failed. The duration of each round is returned by PollInterval()

func UserAgent

func UserAgent() string

UserAgent returns the vcn's User-Agent string

func Version

func Version() string

Version returns the current CodeNotary vcn version string

func WildcardMaxFileNumber added in v0.9.0

func WildcardMaxFileNumber() int

WildcardMaxFileNumber wildcard max file number for a single notarization

Types

type Level

type Level int64

Level is the type for all possible signature levels

const (
	LevelDisabled         Level = -1
	LevelUnknown          Level = 0
	LevelEmailVerified    Level = 1
	LevelSocialVerified   Level = 2
	LevelIDVerified       Level = 3
	LevelLocationVerified Level = 4
	LevelCNLC             Level = 98
	LevelVchain           Level = 99
)

Allowed Level values

func (Level) String added in v0.7.0

func (l Level) String() string

String returns the name of the given level as string.

type Stage

type Stage int64

Stage is the type for all possible stage values

const (
	StageProduction Stage = 0
	StageStaging    Stage = 1
	StageTest       Stage = 2
)

Allowed stage values

func StageEnvironment

func StageEnvironment() Stage

StageEnvironment returns the current Stage value

func (Stage) String added in v0.7.0

func (s Stage) String() string

String returns the name of the stage as string

type Status

type Status int64

Status is the type for all possible asset statuses

const (
	StatusTrusted       Status = 0
	StatusUntrusted     Status = 1
	StatusUnknown       Status = 2
	StatusUnsupported   Status = 3
	StatusApikeyRevoked Status = 4
)

Allowed Status values

func (Status) Int added in v0.9.4

func (s Status) Int() int

func (Status) String added in v0.7.0

func (s Status) String() string

String returns the name of the given status as string

type Visibility

type Visibility int64

Visibility is the type for all visibility values

const (
	VisibilityPublic  Visibility = 0
	VisibilityPrivate Visibility = 1
)

Allowed Visibility values

func VisibilityForFlag

func VisibilityForFlag(public bool) Visibility

VisibilityForFlag returns VisibilityPublic if public is true, otherwise VisibilityPrivate

func (Visibility) String added in v0.7.0

func (v Visibility) String() string

String returns the name of the given visibility as string

Jump to

Keyboard shortcuts

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