Documentation ¶
Overview ¶
Package autofill provides the Chrome DevTools Protocol commands, types, and events for the Autofill domain.
Defines commands and events for Autofill.
Generated by the cdproto-gen command.
Index ¶
- Constants
- type Address
- type AddressField
- type AddressFields
- type AddressUI
- type CreditCard
- type DisableParams
- type EnableParams
- type EventAddressFormFilled
- type FilledField
- type FillingStrategy
- type SetAddressesParams
- func (p *SetAddressesParams) Do(ctx context.Context) (err error)
- func (v SetAddressesParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v SetAddressesParams) MarshalJSON() ([]byte, error)
- func (v *SetAddressesParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *SetAddressesParams) UnmarshalJSON(data []byte) error
- type TriggerParams
- func (p *TriggerParams) Do(ctx context.Context) (err error)
- func (v TriggerParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v TriggerParams) MarshalJSON() ([]byte, error)
- func (v *TriggerParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *TriggerParams) UnmarshalJSON(data []byte) error
- func (p TriggerParams) WithFrameID(frameID cdp.FrameID) *TriggerParams
Constants ¶
const ( CommandTrigger = "Autofill.trigger" CommandSetAddresses = "Autofill.setAddresses" CommandDisable = "Autofill.disable" CommandEnable = "Autofill.enable" )
Command names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
Fields []*AddressField `json:"fields"` // fields and values defining an address.
}
Address [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-Address
func (Address) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Address) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Address) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Address) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type AddressField ¶
type AddressField struct { Name string `json:"name"` // address field name, for example GIVEN_NAME. Value string `json:"value"` // address field value, for example Jon Doe. }
AddressField [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-AddressField
func (AddressField) MarshalEasyJSON ¶
func (v AddressField) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (AddressField) MarshalJSON ¶
func (v AddressField) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*AddressField) UnmarshalEasyJSON ¶
func (v *AddressField) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*AddressField) UnmarshalJSON ¶
func (v *AddressField) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type AddressFields ¶
type AddressFields struct {
Fields []*AddressField `json:"fields"`
}
AddressFields a list of address fields.
See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-AddressFields
func (AddressFields) MarshalEasyJSON ¶
func (v AddressFields) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (AddressFields) MarshalJSON ¶
func (v AddressFields) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*AddressFields) UnmarshalEasyJSON ¶
func (v *AddressFields) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*AddressFields) UnmarshalJSON ¶
func (v *AddressFields) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type AddressUI ¶
type AddressUI struct {
AddressFields []*AddressFields `json:"addressFields"` // A two dimension array containing the repesentation of values from an address profile.
}
AddressUI defines how an address can be displayed like in chrome://settings/addresses. Address UI is a two dimensional array, each inner array is an "address information line", and when rendered in a UI surface should be displayed as such. The following address UI for instance: [[{name: "GIVE_NAME", value: "Jon"}, {name: "FAMILY_NAME", value: "Doe"}], [{name: "CITY", value: "Munich"}, {name: "ZIP", value: "81456"}]] should allow the receiver to render: Jon Doe Munich 81456.
See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-AddressUI
func (AddressUI) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (AddressUI) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*AddressUI) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*AddressUI) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type CreditCard ¶
type CreditCard struct { Number string `json:"number"` // 16-digit credit card number. Name string `json:"name"` // Name of the credit card owner. ExpiryMonth string `json:"expiryMonth"` // 2-digit expiry month. ExpiryYear string `json:"expiryYear"` // 4-digit expiry year. Cvc string `json:"cvc"` // 3-digit card verification code. }
CreditCard [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-CreditCard
func (CreditCard) MarshalEasyJSON ¶
func (v CreditCard) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CreditCard) MarshalJSON ¶
func (v CreditCard) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CreditCard) UnmarshalEasyJSON ¶
func (v *CreditCard) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CreditCard) UnmarshalJSON ¶
func (v *CreditCard) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DisableParams ¶
type DisableParams struct{}
DisableParams disables autofill domain notifications.
func Disable ¶
func Disable() *DisableParams
Disable disables autofill domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#method-disable
func (*DisableParams) Do ¶
func (p *DisableParams) Do(ctx context.Context) (err error)
Do executes Autofill.disable against the provided context.
func (DisableParams) MarshalEasyJSON ¶
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DisableParams) MarshalJSON ¶
func (v DisableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DisableParams) UnmarshalEasyJSON ¶
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DisableParams) UnmarshalJSON ¶
func (v *DisableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EnableParams ¶
type EnableParams struct{}
EnableParams enables autofill domain notifications.
func Enable ¶
func Enable() *EnableParams
Enable enables autofill domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#method-enable
func (*EnableParams) Do ¶
func (p *EnableParams) Do(ctx context.Context) (err error)
Do executes Autofill.enable against the provided context.
func (EnableParams) MarshalEasyJSON ¶
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EnableParams) MarshalJSON ¶
func (v EnableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EnableParams) UnmarshalEasyJSON ¶
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EnableParams) UnmarshalJSON ¶
func (v *EnableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventAddressFormFilled ¶
type EventAddressFormFilled struct { FilledFields []*FilledField `json:"filledFields"` // Information about the fields that were filled AddressUI *AddressUI `json:"addressUi"` // An UI representation of the address used to fill the form. Consists of a 2D array where each child represents an address/profile line. }
EventAddressFormFilled emitted when an address form is filled.
See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#event-addressFormFilled
func (EventAddressFormFilled) MarshalEasyJSON ¶
func (v EventAddressFormFilled) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventAddressFormFilled) MarshalJSON ¶
func (v EventAddressFormFilled) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventAddressFormFilled) UnmarshalEasyJSON ¶
func (v *EventAddressFormFilled) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventAddressFormFilled) UnmarshalJSON ¶
func (v *EventAddressFormFilled) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type FilledField ¶
type FilledField struct { HTMLType string `json:"htmlType"` // The type of the field, e.g text, password etc. ID string `json:"id"` // the html id Name string `json:"name"` // the html name Value string `json:"value"` // the field value AutofillType string `json:"autofillType"` // The actual field type, e.g FAMILY_NAME FillingStrategy FillingStrategy `json:"fillingStrategy"` // The filling strategy }
FilledField [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-FilledField
func (FilledField) MarshalEasyJSON ¶
func (v FilledField) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (FilledField) MarshalJSON ¶
func (v FilledField) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*FilledField) UnmarshalEasyJSON ¶
func (v *FilledField) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*FilledField) UnmarshalJSON ¶
func (v *FilledField) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type FillingStrategy ¶
type FillingStrategy string
FillingStrategy specified whether a filled field was done so by using the html autocomplete attribute or autofill heuristics.
See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-FillingStrategy
const ( FillingStrategyAutocompleteAttribute FillingStrategy = "autocompleteAttribute" FillingStrategyAutofillInferred FillingStrategy = "autofillInferred" )
FillingStrategy values.
func (FillingStrategy) MarshalEasyJSON ¶
func (t FillingStrategy) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (FillingStrategy) MarshalJSON ¶
func (t FillingStrategy) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (FillingStrategy) String ¶
func (t FillingStrategy) String() string
String returns the FillingStrategy as string value.
func (*FillingStrategy) UnmarshalEasyJSON ¶
func (t *FillingStrategy) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*FillingStrategy) UnmarshalJSON ¶
func (t *FillingStrategy) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type SetAddressesParams ¶
type SetAddressesParams struct {
Addresses []*Address `json:"addresses"`
}
SetAddressesParams set addresses so that developers can verify their forms implementation.
func SetAddresses ¶
func SetAddresses(addresses []*Address) *SetAddressesParams
SetAddresses set addresses so that developers can verify their forms implementation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#method-setAddresses
parameters:
addresses
func (*SetAddressesParams) Do ¶
func (p *SetAddressesParams) Do(ctx context.Context) (err error)
Do executes Autofill.setAddresses against the provided context.
func (SetAddressesParams) MarshalEasyJSON ¶
func (v SetAddressesParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SetAddressesParams) MarshalJSON ¶
func (v SetAddressesParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SetAddressesParams) UnmarshalEasyJSON ¶
func (v *SetAddressesParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SetAddressesParams) UnmarshalJSON ¶
func (v *SetAddressesParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type TriggerParams ¶
type TriggerParams struct { FieldID cdp.BackendNodeID `json:"fieldId"` // Identifies a field that serves as an anchor for autofill. FrameID cdp.FrameID `json:"frameId,omitempty"` // Identifies the frame that field belongs to. Card *CreditCard `json:"card"` // Credit card information to fill out the form. Credit card data is not saved. }
TriggerParams trigger autofill on a form identified by the fieldId. If the field and related form cannot be autofilled, returns an error.
func Trigger ¶
func Trigger(fieldID cdp.BackendNodeID, card *CreditCard) *TriggerParams
Trigger trigger autofill on a form identified by the fieldId. If the field and related form cannot be autofilled, returns an error.
See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#method-trigger
parameters:
fieldID - Identifies a field that serves as an anchor for autofill. card - Credit card information to fill out the form. Credit card data is not saved.
func (*TriggerParams) Do ¶
func (p *TriggerParams) Do(ctx context.Context) (err error)
Do executes Autofill.trigger against the provided context.
func (TriggerParams) MarshalEasyJSON ¶
func (v TriggerParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (TriggerParams) MarshalJSON ¶
func (v TriggerParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*TriggerParams) UnmarshalEasyJSON ¶
func (v *TriggerParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*TriggerParams) UnmarshalJSON ¶
func (v *TriggerParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (TriggerParams) WithFrameID ¶
func (p TriggerParams) WithFrameID(frameID cdp.FrameID) *TriggerParams
WithFrameID identifies the frame that field belongs to.