Documentation ¶
Index ¶
- Constants
- func APIEndpoint(resource string) string
- func AssetsRelayContractAddress() string
- func DashboardURL() string
- func GasLimit() uint64
- func GasPrice() *big.Int
- func GitRevision() string
- func MainNet() string
- func OrganisationsRelayContractAddress() string
- func PollInterval() time.Duration
- func StaticBuild() bool
- func StatusColor(status Status) (color.Attribute, color.Attribute, color.Attribute)
- func StatusNameStyled(status Status) string
- func StyleAffordance() (color.Attribute, color.Attribute, color.Attribute)
- func StyleError() (color.Attribute, color.Attribute, color.Attribute)
- func StyleSuccess() (color.Attribute, color.Attribute, color.Attribute)
- func StyleWarning() (color.Attribute, color.Attribute, color.Attribute)
- func TxVerificationRounds() uint64
- func UserAgent() string
- func Version() string
- func WildcardMaxFileNumber() int
- type Level
- type Stage
- type Status
- type Visibility
Constants ¶
const ( VcnLoginEvent string = "VCN_LOGIN" VcnSignEvent string = "VCN_SIGN" VcnVerifyEvent string = "VCN_VERIFY" VcnAlertVerifyEvent string = "VCN_ALERT_VERIFY" )
Event tracking related consts
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
const AttachmentSeparator = ".attach."
const BomEntryKeyName string = "BOM"
const DateShortForm = "2006/1/2-15:04:05"
const IndexDateRangePrefix = "_INDEX.ITEM.INSERTION-DATE."
const VcnAttachmentLabelPrefix string = "_ITEM.ATTACH.LABEL"
const VcnDefaultExitCode = 0
const VcnEnforceSignatureVerifyDesc string = "if this flag is provided vcn will disable signature auto trusting when connecting to a new Codenotary Cloud server"
const VcnExitCode string = "override default exit codes in case of success"
const VcnLCCmdHeaderName = "vcn-command"
const VcnLCLedgerHeaderName string = "lc-ledger"
const VcnLCNotarizeCmdHeaderValue = "notarize"
const VcnLCPluginTypeHeaderName string = "lc-plugin-type"
Ledger compliance
const VcnLCPluginTypeHeaderValue string = "vcn"
const VcnLCVerifyCmdHeaderValue = "verify"
const VcnLCVersionHeaderName string = "version"
const VcnLcApiKeyDesc string = "Codenotary Cloud server api key"
const VcnLcAttachDesc string = "" /* 385-byte string literal not displayed */
const VcnLcAttachmentAuthDesc string = `` /* 286-byte string literal not displayed */
const VcnLcCIAttribDesc string = "detect CI environment variables context if presents and inject "
const VcnLcCertPathDesc string = "local or absolute path to a certificate file needed to set up tls connection to a Codenotary Cloud server"
const VcnLcForceAttachmentDownloadDesc string = "if provided when downloading attachments files are silently overwritten"
const VcnLcHostFlagDesc string = "if set with host, action will be route to a Codenotary Cloud server"
const VcnLcLedgerDesc string = "Codenotary Cloud ledger. Required when a multi-ledger API key is used."
const VcnLcNoTlsDesc string = "allow insecure connections when connecting to a Codenotary Cloud server"
const VcnLcPortFlagDesc string = "" /* 127-byte string literal not displayed */
const VcnLcSkipTlsVerifyDesc string = "disables tls certificate verification when connecting to a Codenotary Cloud server"
const VcnLcUidDesc string = "authenticate on a specific artifact uid"
const VcnPrefix string = "vcn"
const VcnSigningPubKeyDesc string = "" /* 206-byte string literal not displayed */
const VcnSigningPubKeyFileName = ".vcn-trusted-signing-pub-key"
const VcnSigningPubKeyFileNameDesc string = "" /* 312-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func APIEndpoint ¶ added in v0.6.0
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 GitRevision ¶ added in v0.7.0
func GitRevision() string
GitRevision returns the current CodeNotary vcn git revision string
func OrganisationsRelayContractAddress ¶
func OrganisationsRelayContractAddress() string
OrganisationsRelayContractAddress returns the OrganisationsRelay smart contract public address.
func PollInterval ¶
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 ¶
StatusColor returns color.Attribute(s) for the given status
func StatusNameStyled ¶
StatusNameStyled returns the colorized name of the given status as string
func StyleAffordance ¶
StyleAffordance returns color.Attribute(s) for affordance messages
func StyleError ¶
StyleError returns color.Attribute(s) for error messages
func StyleSuccess ¶
StyleSuccess returns color.Attribute(s) for success messages
func StyleWarning ¶
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 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
type Stage ¶
type Stage int64
Stage is the type for all possible stage values
func StageEnvironment ¶
func StageEnvironment() Stage
StageEnvironment returns the current Stage value
type Status ¶
type Status int64
Status is the type for all possible asset statuses
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