Documentation ¶
Index ¶
- func GenBetweenTimeUTC(begin time.Time, end time.Time) time.Time
- func GenFutureNearTimeUTC(delta time.Duration) time.Time
- func GenIssuerWithRealm(issuer string, realm string) string
- func GenPastNearTime(delta time.Duration) time.Time
- func GenPemCertificate() string
- func GenRandBool() bool
- func GenRandDescription() string
- func GenRandDomainLabel() string
- func GenRandDomainName(level int) string
- func GenRandEmail() string
- func GenRandFQDN() string
- func GenRandFQDNWithDomain(domain string) string
- func GenRandFirstName() string
- func GenRandLastName() string
- func GenRandLocationDescription() string
- func GenRandLocationLabel() string
- func GenRandNum(min, max int64) int64
- func GenRandParagraph(n int) string
- func GenRandPointyBool() *bool
- func GenRandString(letters []rune, n int) string
- func GenRandTitle() string
- func GenRandUserID() string
- func GenRandUsername() string
- func GenSubjectWithRealm(subject string, realm string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenBetweenTimeUTC ¶
GenBetweenTimeUTC generate a timestamp between the given parameters as earlier as 'begin' and before 'end'. delta is the duration that set the threshold for the time. Return a time.Time for the expected interval.
func GenFutureNearTimeUTC ¶
GenFutureNearTimeUTC generate a past timestamp not further than delta. delta is the duration that set the threshold for the time. Return a time.Time for the expected interval.
func GenIssuerWithRealm ¶
GenIssuerWithRealm generate a certificate issuer for the given issuer and realm. issuer is a string describing the certificate issuer, for instance "Verisign". realm is the domain realm that the certificate is issuer belongs to. Return a string with the issuer string.
func GenPastNearTime ¶
GenPastNearTime generate a past timestamp not further than delta. delta is the duration that set the threshold for the time. Return a time.Time for the expected interval.
func GenPemCertificate ¶
func GenPemCertificate() string
GenPemCertificate currently return a static PEM certificate.
func GenRandBool ¶
func GenRandBool() bool
GenRandBool generate a random boolean. Return a bool value.
func GenRandDescription ¶
func GenRandDescription() string
GenRandTitle generate random title Return a random string pointer, a pointer to empty string or nil.
func GenRandDomainLabel ¶
func GenRandDomainLabel() string
GenRandDomainLabel generate a random label according to RFC1035 Return the string representing a valid domain label.
func GenRandDomainName ¶
GenRandDomainName generate a random domain name for testing using .test as defined at RFC 6761 level is >= 2 and <= 4. Return a domain name
func GenRandEmail ¶
func GenRandEmail() string
GenRandEmail generate a random email. Return a string.
func GenRandFQDN ¶
func GenRandFQDN() string
GenRandFQDN Generate a random FQDN using a random 3 level domain name. Return a string value.
func GenRandFQDNWithDomain ¶
GenRandFQDNWithDomain Generate a random FQDN for the given domain. domain is the domain that belong the returned FQDN Return a FQDN string representation.
func GenRandFirstName ¶
func GenRandFirstName() string
GenRandFirstName generate a random first name. Return a string.
func GenRandLastName ¶
func GenRandLastName() string
GenRandLastName generate a random last name. Return a string.
func GenRandLocationDescription ¶
func GenRandLocationDescription() string
GenRandLocationDescription generate a random description by adding " location" to a random location label. Return a string with the description.
func GenRandLocationLabel ¶
func GenRandLocationLabel() string
GenRandLocationLabel generate a random location label. Return a string with the label value.
func GenRandNum ¶
GenRandNum generate a random number >= min and <= max interval. min is the lower boundary interval including the value. max is the higher boundary interval including the value.
func GenRandParagraph ¶
GenRandParagraph generate a random paragraph. Return a multiline string.
func GenRandPointyBool ¶
func GenRandPointyBool() *bool
GenRandPointyBool generate a random bool pointer. Return nil, or a bool pointer.
func GenRandString ¶
GenRandString generate a random string from the letters set with length n. letters the set of letters to use. n the length of the string. Return a random string.
func GenRandUserID ¶
func GenRandUserID() string
GenRandUserID Generate a random UUID. Return a string.
func GenRandUsername ¶
func GenRandUsername() string
GenRandUsername generate a random username. Return a string.
func GenSubjectWithRealm ¶
GenSubjectWithRealm generate a certificate subject for the given subject and realm. subject is a string describing the certificate subject, for instance "My Site". realm is the domain realm that the certificate is issued for. Return a string with the subject string.
Types ¶
This section is empty.