option

package
v1.1.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSubscriptionUpdateInterval = 1 * time.Hour
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtraGroup

type ExtraGroup struct {
	Tag                string                          `json:"tag,omitempty"`
	Target             ExtraGroupTarget                `json:"target,omitempty"`
	TagPerSubscription string                          `json:"tag_per_subscription,omitempty"`
	Type               string                          `json:"type,omitempty"`
	Filter             badoption.Listable[string]      `json:"filter,omitempty"`
	Exclude            badoption.Listable[string]      `json:"exclude,omitempty"`
	CustomSelector     *option.SelectorOutboundOptions `json:"custom_selector,omitempty"`
	CustomURLTest      *option.URLTestOutboundOptions  `json:"custom_urltest,omitempty"`
}

type ExtraGroupTarget

type ExtraGroupTarget uint8
const (
	ExtraGroupTargetDefault ExtraGroupTarget = iota
	ExtraGroupTargetGlobal
	ExtraGroupTargetSubscription
)

func (ExtraGroupTarget) MarshalJSON

func (t ExtraGroupTarget) MarshalJSON() ([]byte, error)

func (ExtraGroupTarget) String

func (t ExtraGroupTarget) String() string

func (*ExtraGroupTarget) UnmarshalJSON

func (t *ExtraGroupTarget) UnmarshalJSON(bytes []byte) error

type GitHubRuleSetOptions

type GitHubRuleSetOptions struct {
	Repository string                     `json:"repository,omitempty"`
	Path       string                     `json:"path,omitempty"`
	Prefix     string                     `json:"prefix,omitempty"`
	RuleSet    badoption.Listable[string] `json:"rule_set,omitempty"`
}

type Options

type Options _Options

func (*Options) UnmarshalJSONContext

func (o *Options) UnmarshalJSONContext(ctx context.Context, content []byte) error

type OutboundProcessOptions

type OutboundProcessOptions struct {
	Filter           badoption.Listable[string]        `json:"filter,omitempty"`
	Exclude          badoption.Listable[string]        `json:"exclude,omitempty"`
	FilterType       badoption.Listable[string]        `json:"filter_type,omitempty"`
	ExcludeType      badoption.Listable[string]        `json:"exclude_type,omitempty"`
	Invert           bool                              `json:"invert,omitempty"`
	Remove           bool                              `json:"remove,omitempty"`
	Rename           *badjson.TypedMap[string, string] `json:"rename,omitempty"`
	RemoveEmoji      bool                              `json:"remove_emoji,omitempty"`
	RewriteMultiplex *option.OutboundMultiplexOptions  `json:"rewrite_multiplex,omitempty"`
}

type Profile

type Profile struct {
	Name                 string                            `json:"name,omitempty"`
	Template             string                            `json:"template,omitempty"`
	TemplateForPlatform  *badjson.TypedMap[string, string] `json:"template_for_platform,omitempty"`
	TemplateForUserAgent *badjson.TypedMap[string, string] `json:"template_for_user_agent,omitempty"`
	Outbound             badoption.Listable[string]        `json:"outbound,omitempty"`
	Subscription         badoption.Listable[string]        `json:"subscription,omitempty"`
}

type RuleSet

type RuleSet _RuleSet

func (*RuleSet) MarshalJSON

func (r *RuleSet) MarshalJSON() ([]byte, error)

func (*RuleSet) UnmarshalJSON

func (r *RuleSet) UnmarshalJSON(content []byte) error

type Subscription

type Subscription struct {
	Name             string                                     `json:"name,omitempty"`
	URL              string                                     `json:"url,omitempty"`
	UserAgent        string                                     `json:"user_agent,omitempty"`
	UpdateInterval   badoption.Duration                         `json:"update_interval,omitempty"`
	Process          badoption.Listable[OutboundProcessOptions] `json:"process,omitempty"`
	DeDuplication    bool                                       `json:"deduplication,omitempty"`
	GenerateSelector bool                                       `json:"generate_selector,omitempty"`
	GenerateURLTest  bool                                       `json:"generate_urltest,omitempty"`
	URLTestTagSuffix string                                     `json:"urltest_suffix,omitempty"`
	CustomSelector   *option.SelectorOutboundOptions            `json:"custom_selector,omitempty"`
	CustomURLTest    *option.URLTestOutboundOptions             `json:"custom_urltest,omitempty"`
}

type Template

type Template _Template

func (Template) DisableIPv6

func (t Template) DisableIPv6() bool

func (*Template) MarshalJSON

func (t *Template) MarshalJSON() ([]byte, error)

func (*Template) UnmarshalJSONContext

func (t *Template) UnmarshalJSONContext(ctx context.Context, content []byte) error

type TypedMessage

type TypedMessage[T any] struct {
	Message json.RawMessage
	Value   T
}

func (*TypedMessage[T]) MarshalJSON

func (m *TypedMessage[T]) MarshalJSON() ([]byte, error)

func (*TypedMessage[T]) UnmarshalJSON

func (m *TypedMessage[T]) UnmarshalJSON(content []byte) error

type User

type User struct {
	Name           string                     `json:"name,omitempty"`
	Password       string                     `json:"password,omitempty"`
	Profile        badoption.Listable[string] `json:"profile,omitempty"`
	DefaultProfile string                     `json:"default_profile,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL