You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
659 B
36 lines
659 B
package hackbrowserdata
|
|
|
|
type Options struct {
|
|
Name browser
|
|
Storage string
|
|
ProfilePath string
|
|
IsEnableAllUser bool
|
|
DataTypes []DataType
|
|
NewBrowserFunc func(*Options) (Browser, error)
|
|
}
|
|
|
|
type BrowserOption func(*Options)
|
|
|
|
func WithBrowserName(p string) BrowserOption {
|
|
return func(o *Options) {
|
|
o.Name = browser(p)
|
|
}
|
|
}
|
|
|
|
func WithProfilePath(p string) BrowserOption {
|
|
return func(o *Options) {
|
|
o.ProfilePath = p
|
|
}
|
|
}
|
|
|
|
func WithEnableAllUsers(e bool) BrowserOption {
|
|
return func(o *Options) {
|
|
o.IsEnableAllUser = e
|
|
}
|
|
}
|
|
|
|
func WithStorageName(s string) BrowserOption {
|
|
return func(o *Options) {
|
|
o.Storage = s
|
|
}
|
|
}
|
|
|