diff options
author | 2025-02-03 10:12:35 +0000 | |
---|---|---|
committer | 2025-02-03 10:12:35 +0000 | |
commit | c086d4048c2a26a0bf70c1ced24c78680a786710 (patch) | |
tree | cf7606e8452e9047d7f0e0d9b6de10edf7ebdc89 /vendor/github.com/godbus/dbus/v5/match.go | |
parent | [chore]: Bump golang.org/x/oauth2 from 0.24.0 to 0.25.0 (#3725) (diff) | |
download | gotosocial-c086d4048c2a26a0bf70c1ced24c78680a786710.tar.xz |
[chore]: Bump github.com/KimMachineGun/automemlimit from 0.6.1 to 0.7.0 (#3726)
Bumps [github.com/KimMachineGun/automemlimit](https://github.com/KimMachineGun/automemlimit) from 0.6.1 to 0.7.0.
- [Release notes](https://github.com/KimMachineGun/automemlimit/releases)
- [Commits](https://github.com/KimMachineGun/automemlimit/compare/v0.6.1...v0.7.0)
---
updated-dependencies:
- dependency-name: github.com/KimMachineGun/automemlimit
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/godbus/dbus/v5/match.go')
-rw-r--r-- | vendor/github.com/godbus/dbus/v5/match.go | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/vendor/github.com/godbus/dbus/v5/match.go b/vendor/github.com/godbus/dbus/v5/match.go deleted file mode 100644 index 5a607e53e..000000000 --- a/vendor/github.com/godbus/dbus/v5/match.go +++ /dev/null @@ -1,89 +0,0 @@ -package dbus - -import ( - "strconv" - "strings" -) - -// MatchOption specifies option for dbus routing match rule. Options can be constructed with WithMatch* helpers. -// For full list of available options consult -// https://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-routing-match-rules -type MatchOption struct { - key string - value string -} - -func formatMatchOptions(options []MatchOption) string { - items := make([]string, 0, len(options)) - for _, option := range options { - items = append(items, option.key+"='"+option.value+"'") - } - return strings.Join(items, ",") -} - -// WithMatchOption creates match option with given key and value -func WithMatchOption(key, value string) MatchOption { - return MatchOption{key, value} -} - -// doesn't make sense to export this option because clients can only -// subscribe to messages with signal type. -func withMatchType(typ string) MatchOption { - return WithMatchOption("type", typ) -} - -// WithMatchSender sets sender match option. -func WithMatchSender(sender string) MatchOption { - return WithMatchOption("sender", sender) -} - -// WithMatchSender sets interface match option. -func WithMatchInterface(iface string) MatchOption { - return WithMatchOption("interface", iface) -} - -// WithMatchMember sets member match option. -func WithMatchMember(member string) MatchOption { - return WithMatchOption("member", member) -} - -// WithMatchObjectPath creates match option that filters events based on given path -func WithMatchObjectPath(path ObjectPath) MatchOption { - return WithMatchOption("path", string(path)) -} - -// WithMatchPathNamespace sets path_namespace match option. -func WithMatchPathNamespace(namespace ObjectPath) MatchOption { - return WithMatchOption("path_namespace", string(namespace)) -} - -// WithMatchDestination sets destination match option. -func WithMatchDestination(destination string) MatchOption { - return WithMatchOption("destination", destination) -} - -// WithMatchArg sets argN match option, range of N is 0 to 63. -func WithMatchArg(argIdx int, value string) MatchOption { - if argIdx < 0 || argIdx > 63 { - panic("range of argument index is 0 to 63") - } - return WithMatchOption("arg"+strconv.Itoa(argIdx), value) -} - -// WithMatchArgPath sets argN path match option, range of N is 0 to 63. -func WithMatchArgPath(argIdx int, path string) MatchOption { - if argIdx < 0 || argIdx > 63 { - panic("range of argument index is 0 to 63") - } - return WithMatchOption("arg"+strconv.Itoa(argIdx)+"path", path) -} - -// WithMatchArg0Namespace sets arg0namespace match option. -func WithMatchArg0Namespace(arg0Namespace string) MatchOption { - return WithMatchOption("arg0namespace", arg0Namespace) -} - -// WithMatchEavesdrop sets eavesdrop match option. -func WithMatchEavesdrop(eavesdrop bool) MatchOption { - return WithMatchOption("eavesdrop", strconv.FormatBool(eavesdrop)) -} |