Documentation ¶
Index ¶
- Constants
- func ArgList(t *pdl.Type, d *pdl.Domain, domains []*pdl.Domain, all bool) string
- func Base64EncodedRetParam(t *pdl.Type) *pdl.Type
- func CamelName(t *pdl.Type) string
- func CommandMethodType(t *pdl.Type, d *pdl.Domain) string
- func CommandReturnsType(t *pdl.Type) string
- func CommandTemplate(c *pdl.Type, d *pdl.Domain, domains []*pdl.Domain) string
- func CommandType(t *pdl.Type) string
- func DocRefLink(t *pdl.Type) string
- func DomainManagerTemplate(domains []*pdl.Domain) string
- func DomainTemplate(d *pdl.Domain, domains []*pdl.Domain) string
- func EmptyRetList(t *pdl.Type, d *pdl.Domain, domains []*pdl.Domain) string
- func EnumValueName(t *pdl.Type, v string) string
- func EventMethodType(t *pdl.Type, d *pdl.Domain) string
- func EventType(t *pdl.Type) string
- func FileHeader(pkgName string, d *pdl.Domain) string
- func FileImportTemplate(importMap map[string]string) string
- func GoEmptyValue(t *pdl.Type, d *pdl.Domain, domains []*pdl.Domain) string
- func GoEnumEmptyValue(te pdl.TypeEnum) string
- func GoEnumType(te pdl.TypeEnum) string
- func GoName(t *pdl.Type, noExposeOverride bool) string
- func GoType(t *pdl.Type, d *pdl.Domain, domains []*pdl.Domain) string
- func GoTypeDef(t *pdl.Type, d *pdl.Domain, domains []*pdl.Domain, extra []*pdl.Type, ...) string
- func IsTypeOriginallyNilable(t *pdl.Type, d *pdl.Domain, domains []*pdl.Domain) bool
- func ParamDesc(t *pdl.Type) string
- func ParamList(t *pdl.Type, d *pdl.Domain, domains []*pdl.Domain, all bool) string
- func ProtoName(t *pdl.Type, d *pdl.Domain) string
- func ResolveRef(t *pdl.Type, d *pdl.Domain, domains []*pdl.Domain) (pdl.DomainType, *pdl.Type)
- func ResolveType(t *pdl.Type, d *pdl.Domain, domains []*pdl.Domain) (pdl.DomainType, *pdl.Type, string)
- func RetNameList(t *pdl.Type, valname string, d *pdl.Domain, domains []*pdl.Domain) string
- func RetParamDesc(t *pdl.Type) string
- func RetTypeList(t *pdl.Type, d *pdl.Domain, domains []*pdl.Domain) string
- func StreamCommandTemplate(qw422016 *qt422016.Writer, c *pdl.Type, d *pdl.Domain, domains []*pdl.Domain)
- func StreamDomainManagerTemplate(qw422016 *qt422016.Writer, domains []*pdl.Domain)
- func StreamDomainTemplate(qw422016 *qt422016.Writer, d *pdl.Domain, domains []*pdl.Domain)
- func StreamFileHeader(qw422016 *qt422016.Writer, pkgName string, d *pdl.Domain)
- func StreamFileImportTemplate(qw422016 *qt422016.Writer, importMap map[string]string)
- func StructDef(types []*pdl.Type, d *pdl.Domain, domains []*pdl.Domain, ...) string
- func TypeName(t *pdl.Type, prefix, suffix string) string
- func WriteCommandTemplate(qq422016 qtio422016.Writer, c *pdl.Type, d *pdl.Domain, domains []*pdl.Domain)
- func WriteDomainManagerTemplate(qq422016 qtio422016.Writer, domains []*pdl.Domain)
- func WriteDomainTemplate(qq422016 qtio422016.Writer, d *pdl.Domain, domains []*pdl.Domain)
- func WriteFileHeader(qq422016 qtio422016.Writer, pkgName string, d *pdl.Domain)
- func WriteFileImportTemplate(qq422016 qtio422016.Writer, importMap map[string]string)
Constants ¶
const ( TypePrefix = "" TypeSuffix = "" EventMethodPrefix = "Event" EventMethodSuffix = "" CommandMethodPrefix = "Command" CommandMethodSuffix = "" EventTypePrefix = "Event" EventTypeSuffix = "" CommandTypePrefix = "" CommandTypeSuffix = "Params" CommandReturnsPrefix = "" CommandReturnsSuffix = "Returns" OptionFuncPrefix = "With" OptionFuncSuffix = "" // Base64EncodedParamName is the base64encoded variable name in command // return values when they are optionally base64 encoded. Base64EncodedParamName = "base64Encoded" // Base64EncodedDescriptionPrefix is the prefix for command return // description prefix when base64 encoded. Base64EncodedDescriptionPrefix = "Base64-encoded" // ChromeDevToolsDocBase is the base URL for the Chrome DevTools // documentation site. // // tot is "tip-of-tree" ChromeDevToolsDocBase = "https://chromedevtools.github.io/devtools-protocol/tot" )
Prefix and suffix values.
Variables ¶
This section is empty.
Functions ¶
func Base64EncodedRetParam ¶
Base64EncodedRetParam returns the base64 encoded return parameter, or nil if no parameters are base64 encoded.
func CommandMethodType ¶
CommandMethodType returns the method type of the event.
func CommandReturnsType ¶
CommandReturnsType returns the type of the command return type.
func CommandTemplate ¶
func CommandType ¶
CommandType returns the type of the command.
func DocRefLink ¶
DocRefLink returns the reference documentation link for the type.
func DomainManagerTemplate ¶
func EmptyRetList ¶
EmptyRetList returns a list of the empty return values.
func EnumValueName ¶
EnumValueName returns the name for a enum value.
func EventMethodType ¶
EventMethodType returns the method type of the event.
func FileImportTemplate ¶
func GoEmptyValue ¶
GoEmptyValue returns the empty Go value for the type.
func GoEnumEmptyValue ¶
GoEnumEmptyValue returns the Go empty value for the TypeEnum.
func GoEnumType ¶
GoEnumType returns the Go type for the TypeEnum.
func GoTypeDef ¶
func GoTypeDef(t *pdl.Type, d *pdl.Domain, domains []*pdl.Domain, extra []*pdl.Type, noExposeOverride, omitOnlyWhenOptional bool) string
GoTypeDef returns the Go type definition for the type.
func IsTypeOriginallyNilable ¶
IsTypeOriginallyNilable is a predicate.
func ResolveRef ¶
ResolveRef is a utility func to resolve the fully qualified name of a type's ref from the list of provided domains, relative to domain d when ref is not namespaced.
func ResolveType ¶
func ResolveType(t *pdl.Type, d *pdl.Domain, domains []*pdl.Domain) (pdl.DomainType, *pdl.Type, string)
ResolveType resolves the type relative to the Go domain.
Returns the DomainType of the underlying type, the underlying type (or the original passed type if not a reference) and the fully qualified name type name.
func RetNameList ¶
RetNameList returns a <valname>.<name> list for a command's return list.
func RetParamDesc ¶
RetParamDesc returns a return parameter description.
func RetTypeList ¶
RetTypeList returns a list of the return types.
func StreamCommandTemplate ¶
func StreamDomainTemplate ¶
func StreamFileHeader ¶
func StructDef ¶
func StructDef(types []*pdl.Type, d *pdl.Domain, domains []*pdl.Domain, noExposeOverride, omitOnlyWhenOptional bool) string
StructDef returns a struct definition for a list of types.
func WriteCommandTemplate ¶
func WriteDomainManagerTemplate ¶
func WriteDomainManagerTemplate(qq422016 qtio422016.Writer, domains []*pdl.Domain)
func WriteDomainTemplate ¶
func WriteFileHeader ¶
func WriteFileHeader(qq422016 qtio422016.Writer, pkgName string, d *pdl.Domain)
func WriteFileImportTemplate ¶
func WriteFileImportTemplate(qq422016 qtio422016.Writer, importMap map[string]string)
Types ¶
This section is empty.