Documentation
¶
Index ¶
- Constants
- func CheckIsCurrentPlanet(base64Planet, existingHashStr string) bool
- func GetCurrentPlanetHashFromOS() string
- func IsRunAsRoot() bool
- func ReplacePlanetAndJoinNetwork(base64Planet string, networkID string, callback func(int, string)) error
- type Identity
- type InetAddress
- type Root
- type World
Constants ¶
View Source
const ( ZT_C25519_PUBLIC_KEY_LEN = 64 ZT_C25519_SIGNATURE_LEN = 96 ZT_WORLD_MAX_ROOTS = 4 ZT_WORLD_ID_EARTH = 149604618 ZT_INETADDRESS_IPV4 = 0x04 ZT_INETADDRESS_IPV6 = 0x06 )
Variables ¶
This section is empty.
Functions ¶
func CheckIsCurrentPlanet ¶
func GetCurrentPlanetHashFromOS ¶
func GetCurrentPlanetHashFromOS() string
func IsRunAsRoot ¶
func IsRunAsRoot() bool
Types ¶
type InetAddress ¶
func ParseInetAddress ¶
func ParseInetAddress(buf *bytes.Reader) (*InetAddress, error)
func (*InetAddress) String ¶
func (ia *InetAddress) String() string
type Root ¶
type Root struct {
Identity Identity
StableEndpoints []InetAddress
}
type World ¶
type World struct {
Type uint8
ID uint64
Timestamp uint64
UpdatesMustBeSignedBy [ZT_C25519_PUBLIC_KEY_LEN]byte
Signature [ZT_C25519_SIGNATURE_LEN]byte
Roots []Root
RawData []byte
}
func ParsePlanetBase64 ¶
func ParsePlanetFile ¶
func ParseWorld ¶
Click to show internal directories.
Click to hide internal directories.