github.com/sagernet/sing@v0.4.0-beta.19.0.20240518125136-f67a0988a636/common/abx/internal/constraints.go (about)

     1  package internal
     2  
     3  var ProtocolMagicVersion0 = []byte{0x41, 0x42, 0x58, 0x00}
     4  
     5  const (
     6  	StartDocument         = 0
     7  	EndDocument           = 1
     8  	StartTag              = 2
     9  	EndTag                = 3
    10  	TEXT                  = 4
    11  	CDSECT                = 5
    12  	EntityRef             = 6
    13  	IgnorableWhitespace   = 7
    14  	ProcessingInstruction = 8
    15  	COMMENT               = 9
    16  	DOCDECL               = 10
    17  	ATTRIBUTE             = 15
    18  	TypeNull              = 1 << 4
    19  	TypeString            = 2 << 4
    20  	TypeStringInterned    = 3 << 4
    21  	TypeBytesHex          = 4 << 4
    22  	TypeBytesBase64       = 5 << 4
    23  	TypeInt               = 6 << 4
    24  	TypeIntHex            = 7 << 4
    25  	TypeLong              = 8 << 4
    26  	TypeLongHex           = 9 << 4
    27  	TypeFloat             = 10 << 4
    28  	TypeDouble            = 11 << 4
    29  	TypeBooleanTrue       = 12 << 4
    30  	TypeBooleanFalse      = 13 << 4
    31  	MaxUnsignedShort      = 65535
    32  )