Documentation ¶
Index ¶
- Constants
- func Parse36BaseIntValue(v string) (int64, error)
- func Parse36BaseUIntValue(v string) (uint64, error)
- func ParseInt64Param(params []string, minValue, maxValue int64) ([]string, int64, *mpqerr.ErrorResponse)
- func ParseItemId(params []string) ([]string, string, *mpqerr.ErrorResponse)
- func ParseReceiptParam(params []string) ([]string, string, *mpqerr.ErrorResponse)
- func ParseServiceType(params []string) ([]string, string, *mpqerr.ErrorResponse)
- func ParseStringParam(params []string, minLen, maxLen int64) ([]string, string, *mpqerr.ErrorResponse)
- func ParseUserItemId(params []string) ([]string, string, *mpqerr.ErrorResponse)
- func ValidateItemId(itemId string) bool
- func ValidateServiceName(svcName string) bool
- func ValidateUserItemId(itemId string) bool
- type Tokenizer
Constants ¶
View Source
const ( STATE_PARSE_TEXT_TOKEN = 1 STATE_PARSE_BINARY_PAYLOAD = 2 SYMBOL_CR = 0x0A )
View Source
const ( MAX_TOKENS_PER_MSG = 32 MAX_RECV_BUFFER_SIZE = 4096 MAX_TEXT_TOKEN_LEN = 256 MAX_BINARY_TOKEN_LEN = 128 * 1024 * 1024 START_ASCII_RANGE = 0x21 END_ASCII_RANGE = 0x7E INIT_TOKEN_BUFFER_LEN = 48 )
View Source
const ( MaxItemIdLength = 256 MaxServiceNameLength = 80 )
Variables ¶
This section is empty.
Functions ¶
func Parse36BaseIntValue ¶
func Parse36BaseUIntValue ¶
func ParseInt64Param ¶
func ParseItemId ¶
func ParseItemId(params []string) ([]string, string, *mpqerr.ErrorResponse)
ParseItemId parses item id that can use all characters.
func ParseReceiptParam ¶
func ParseReceiptParam(params []string) ([]string, string, *mpqerr.ErrorResponse)
func ParseServiceType ¶
func ParseServiceType(params []string) ([]string, string, *mpqerr.ErrorResponse)
func ParseStringParam ¶
func ParseUserItemId ¶
func ParseUserItemId(params []string) ([]string, string, *mpqerr.ErrorResponse)
ParseUserItemId parses user provided item id that can not start with '_'.
func ValidateItemId ¶
ValidateItemId checks if symbol range is in the allowed scope for the item id
func ValidateServiceName ¶
ValidateServiceName validates service name to conform internal restrictions.
func ValidateUserItemId ¶
ValidateUserItemId checks if symbol range is in the allowed scope for the item id User defined ID can not start with the underscore.
Types ¶
Click to show internal directories.
Click to hide internal directories.