Migration from /Godeps to /vendor

socks-filter
Bruce Leidl 8 years ago
parent c779cc6b9b
commit 3ac218f288

16
Godeps/Godeps.json generated

@ -1,6 +1,7 @@
{
"ImportPath": "github.com/subgraph/fw-daemon",
"GoVersion": "go1.5",
"GoVersion": "go1.6",
"GodepVersion": "v74",
"Packages": [
"./..."
],
@ -10,6 +11,11 @@
"Comment": "v3-15-g230e4b2",
"Rev": "230e4b23db2fd81c53eaa0073f76659d4849ce51"
},
{
"ImportPath": "github.com/godbus/dbus/introspect",
"Comment": "v3-15-g230e4b2",
"Rev": "230e4b23db2fd81c53eaa0073f76659d4849ce51"
},
{
"ImportPath": "github.com/gotk3/gotk3/cairo",
"Comment": "GOTK3_0_2_0-430-ge68c426",
@ -38,6 +44,14 @@
{
"ImportPath": "github.com/op/go-logging",
"Rev": "dfaf3dff9b631bc4236201d90d41ee0de9202889"
},
{
"ImportPath": "github.com/subgraph/go-procsnitch",
"Rev": "84754d9af0ff985a28b3e6be743c7d453fda7322"
},
{
"ImportPath": "golang.org/x/net/proxy",
"Rev": "2e9cee70ee697e0a2ef894b560dda50dec7dff58"
}
]
}

2
Godeps/_workspace/.gitignore generated vendored

@ -1,2 +0,0 @@
/pkg
/bin

@ -1,264 +0,0 @@
// Package prop provides the Properties struct which can be used to implement
// org.freedesktop.DBus.Properties.
package prop
import (
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/godbus/dbus"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/godbus/dbus/introspect"
"sync"
)
// EmitType controls how org.freedesktop.DBus.Properties.PropertiesChanged is
// emitted for a property. If it is EmitTrue, the signal is emitted. If it is
// EmitInvalidates, the signal is also emitted, but the new value of the property
// is not disclosed.
type EmitType byte
const (
EmitFalse EmitType = iota
EmitTrue
EmitInvalidates
)
// ErrIfaceNotFound is the error returned to peers who try to access properties
// on interfaces that aren't found.
var ErrIfaceNotFound = dbus.NewError("org.freedesktop.DBus.Properties.Error.InterfaceNotFound", nil)
// ErrPropNotFound is the error returned to peers trying to access properties
// that aren't found.
var ErrPropNotFound = dbus.NewError("org.freedesktop.DBus.Properties.Error.PropertyNotFound", nil)
// ErrReadOnly is the error returned to peers trying to set a read-only
// property.
var ErrReadOnly = dbus.NewError("org.freedesktop.DBus.Properties.Error.ReadOnly", nil)
// ErrInvalidArg is returned to peers if the type of the property that is being
// changed and the argument don't match.
var ErrInvalidArg = dbus.NewError("org.freedesktop.DBus.Properties.Error.InvalidArg", nil)
// The introspection data for the org.freedesktop.DBus.Properties interface.
var IntrospectData = introspect.Interface{
Name: "org.freedesktop.DBus.Properties",
Methods: []introspect.Method{
{
Name: "Get",
Args: []introspect.Arg{
{"interface", "s", "in"},
{"property", "s", "in"},
{"value", "v", "out"},
},
},
{
Name: "GetAll",
Args: []introspect.Arg{
{"interface", "s", "in"},
{"props", "a{sv}", "out"},
},
},
{
Name: "Set",
Args: []introspect.Arg{
{"interface", "s", "in"},
{"property", "s", "in"},
{"value", "v", "in"},
},
},
},
Signals: []introspect.Signal{
{
Name: "PropertiesChanged",
Args: []introspect.Arg{
{"interface", "s", "out"},
{"changed_properties", "a{sv}", "out"},
{"invalidates_properties", "as", "out"},
},
},
},
}
// The introspection data for the org.freedesktop.DBus.Properties interface, as
// a string.
const IntrospectDataString = `
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface" direction="in" type="s"/>
<arg name="property" direction="in" type="s"/>
<arg name="value" direction="out" type="v"/>
</method>
<method name="GetAll">
<arg name="interface" direction="in" type="s"/>
<arg name="props" direction="out" type="a{sv}"/>
</method>
<method name="Set">
<arg name="interface" direction="in" type="s"/>
<arg name="property" direction="in" type="s"/>
<arg name="value" direction="in" type="v"/>
</method>
<signal name="PropertiesChanged">
<arg name="interface" type="s"/>
<arg name="changed_properties" type="a{sv}"/>
<arg name="invalidates_properties" type="as"/>
</signal>
</interface>
`
// Prop represents a single property. It is used for creating a Properties
// value.
type Prop struct {
// Initial value. Must be a DBus-representable type.
Value interface{}
// If true, the value can be modified by calls to Set.
Writable bool
// Controls how org.freedesktop.DBus.Properties.PropertiesChanged is
// emitted if this property changes.
Emit EmitType
// If not nil, anytime this property is changed by Set, this function is
// called with an appropiate Change as its argument. If the returned error
// is not nil, it is sent back to the caller of Set and the property is not
// changed.
Callback func(*Change) *dbus.Error
}
// Change represents a change of a property by a call to Set.
type Change struct {
Props *Properties
Iface string
Name string
Value interface{}
}
// Properties is a set of values that can be made available to the message bus
// using the org.freedesktop.DBus.Properties interface. It is safe for
// concurrent use by multiple goroutines.
type Properties struct {
m map[string]map[string]*Prop
mut sync.RWMutex
conn *dbus.Conn
path dbus.ObjectPath
}
// New returns a new Properties structure that manages the given properties.
// The key for the first-level map of props is the name of the interface; the
// second-level key is the name of the property. The returned structure will be
// exported as org.freedesktop.DBus.Properties on path.
func New(conn *dbus.Conn, path dbus.ObjectPath, props map[string]map[string]*Prop) *Properties {
p := &Properties{m: props, conn: conn, path: path}
conn.Export(p, path, "org.freedesktop.DBus.Properties")
return p
}
// Get implements org.freedesktop.DBus.Properties.Get.
func (p *Properties) Get(iface, property string) (dbus.Variant, *dbus.Error) {
p.mut.RLock()
defer p.mut.RUnlock()
m, ok := p.m[iface]
if !ok {
return dbus.Variant{}, ErrIfaceNotFound
}
prop, ok := m[property]
if !ok {
return dbus.Variant{}, ErrPropNotFound
}
return dbus.MakeVariant(prop.Value), nil
}
// GetAll implements org.freedesktop.DBus.Properties.GetAll.
func (p *Properties) GetAll(iface string) (map[string]dbus.Variant, *dbus.Error) {
p.mut.RLock()
defer p.mut.RUnlock()
m, ok := p.m[iface]
if !ok {
return nil, ErrIfaceNotFound
}
rm := make(map[string]dbus.Variant, len(m))
for k, v := range m {
rm[k] = dbus.MakeVariant(v.Value)
}
return rm, nil
}
// GetMust returns the value of the given property and panics if either the
// interface or the property name are invalid.
func (p *Properties) GetMust(iface, property string) interface{} {
p.mut.RLock()
defer p.mut.RUnlock()
return p.m[iface][property].Value
}
// Introspection returns the introspection data that represents the properties
// of iface.
func (p *Properties) Introspection(iface string) []introspect.Property {
p.mut.RLock()
defer p.mut.RUnlock()
m := p.m[iface]
s := make([]introspect.Property, 0, len(m))
for k, v := range m {
p := introspect.Property{Name: k, Type: dbus.SignatureOf(v.Value).String()}
if v.Writable {
p.Access = "readwrite"
} else {
p.Access = "read"
}
s = append(s, p)
}
return s
}
// set sets the given property and emits PropertyChanged if appropiate. p.mut
// must already be locked.
func (p *Properties) set(iface, property string, v interface{}) {
prop := p.m[iface][property]
prop.Value = v
switch prop.Emit {
case EmitFalse:
// do nothing
case EmitInvalidates:
p.conn.Emit(p.path, "org.freedesktop.DBus.Properties.PropertiesChanged",
iface, map[string]dbus.Variant{}, []string{property})
case EmitTrue:
p.conn.Emit(p.path, "org.freedesktop.DBus.Properties.PropertiesChanged",
iface, map[string]dbus.Variant{property: dbus.MakeVariant(v)},
[]string{})
default:
panic("invalid value for EmitType")
}
}
// Set implements org.freedesktop.Properties.Set.
func (p *Properties) Set(iface, property string, newv dbus.Variant) *dbus.Error {
p.mut.Lock()
defer p.mut.Unlock()
m, ok := p.m[iface]
if !ok {
return ErrIfaceNotFound
}
prop, ok := m[property]
if !ok {
return ErrPropNotFound
}
if !prop.Writable {
return ErrReadOnly
}
if newv.Signature() != dbus.SignatureOf(prop.Value) {
return ErrInvalidArg
}
if prop.Callback != nil {
err := prop.Callback(&Change{p, iface, property, newv.Value()})
if err != nil {
return err
}
}
p.set(iface, property, newv.Value())
return nil
}
// SetMust sets the value of the given property and panics if the interface or
// the property name are invalid.
func (p *Properties) SetMust(iface, property string, v interface{}) {
p.mut.Lock()
p.set(iface, property, v)
p.mut.Unlock()
}

@ -1,49 +0,0 @@
package main
import (
"os"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/op/go-logging"
)
var log = logging.MustGetLogger("example")
// Example format string. Everything except the message has a custom color
// which is dependent on the log level. Many fields have a custom output
// formatting too, eg. the time returns the hour down to the milli second.
var format = logging.MustStringFormatter(
`%{color}%{time:15:04:05.000} %{shortfunc} â–¶ %{level:.4s} %{id:03x}%{color:reset} %{message}`,
)
// Password is just an example type implementing the Redactor interface. Any
// time this is logged, the Redacted() function will be called.
type Password string
func (p Password) Redacted() interface{} {
return logging.Redact(string(p))
}
func main() {
// For demo purposes, create two backend for os.Stderr.
backend1 := logging.NewLogBackend(os.Stderr, "", 0)
backend2 := logging.NewLogBackend(os.Stderr, "", 0)
// For messages written to backend2 we want to add some additional
// information to the output, including the used log level and the name of
// the function.
backend2Formatter := logging.NewBackendFormatter(backend2, format)
// Only errors and more severe messages should be sent to backend1
backend1Leveled := logging.AddModuleLevel(backend1)
backend1Leveled.SetLevel(logging.ERROR, "")
// Set the backends to be used.
logging.SetBackend(backend1Leveled, backend2Formatter)
log.Debugf("debug %s", Password("secret"))
log.Info("info")
log.Notice("notice")
log.Warning("warning")
log.Error("err")
log.Critical("crit")
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

@ -6,10 +6,9 @@ import (
"path"
"strings"
"github.com/godbus/dbus"
"github.com/godbus/dbus/introspect"
"github.com/op/go-logging"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/godbus/dbus"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/godbus/dbus/introspect"
// "github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/op/go-logging"
)
const introspectXml = `

@ -7,8 +7,8 @@ import (
"path/filepath"
"reflect"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/gtk"
"github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/gtk"
"github.com/subgraph/fw-daemon/fw-settings/definitions"
)

@ -1,8 +1,8 @@
package main
import (
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/gtk"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/op/go-logging"
"github.com/gotk3/gotk3/gtk"
"github.com/op/go-logging"
)
var levelToId = map[int32]string{

@ -1,7 +1,7 @@
package main
import (
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/godbus/dbus"
"github.com/godbus/dbus"
)
type dbusObject struct {

@ -4,8 +4,8 @@ import (
"os"
"fmt"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/gtk"
"github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/gtk"
)
func failDialog(parent *gtk.Window, format string, args ...interface{}) {

@ -2,7 +2,7 @@ package main
import (
"fmt"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/gtk"
"github.com/gotk3/gotk3/gtk"
"net"
"strconv"
"strings"

@ -2,7 +2,7 @@ package main
import (
"fmt"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/gtk"
"github.com/gotk3/gotk3/gtk"
"strings"
)

@ -15,7 +15,6 @@ import (
"github.com/subgraph/fw-daemon/nfqueue"
"github.com/subgraph/go-procsnitch"
// "github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/op/go-logging"
"github.com/op/go-logging"
)

@ -2,7 +2,7 @@ package main
import (
"fmt"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/godbus/dbus"
"github.com/godbus/dbus"
"os/user"
"strconv"
"sync"

@ -2,7 +2,7 @@ package introspect
import (
"encoding/xml"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/godbus/dbus"
"github.com/godbus/dbus"
"strings"
)

@ -2,7 +2,7 @@ package introspect
import (
"encoding/xml"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/godbus/dbus"
"github.com/godbus/dbus"
"reflect"
"strings"
)

@ -26,7 +26,7 @@ import "C"
import (
"unsafe"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/glib"
)
func init() {

@ -124,4 +124,3 @@ func (v *Context) TextExtents(utf8 string) TextExtents {
// TODO: cairo_text_cluster_allocate
// TODO: cairo_text_cluster_free

@ -28,7 +28,7 @@ import (
"strconv"
"unsafe"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/glib"
)
func init() {

@ -8,7 +8,7 @@ import (
"runtime"
"unsafe"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/glib"
)
/*

@ -6,8 +6,8 @@ import "C"
import (
"unsafe"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/gdk"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/gdk"
"github.com/gotk3/gotk3/glib"
)
func init() {

@ -9,8 +9,8 @@ import "C"
import (
"unsafe"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/gdk"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/gdk"
"github.com/gotk3/gotk3/glib"
)
// AccelFlags is a representation of GTK's GtkAccelFlags

@ -32,7 +32,7 @@ import "C"
import (
"unsafe"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/glib"
)
func init() {

@ -6,7 +6,7 @@ import "C"
import (
"unsafe"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/glib"
)
func init() {

@ -10,7 +10,7 @@ import (
"runtime"
"unsafe"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/glib"
)
// ApplicationInhibitFlags is a representation of GTK's GtkApplicationInhibitFlags.

@ -10,7 +10,7 @@ import "C"
import (
"unsafe"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/glib"
)
// PrefersAppMenu is a wrapper around gtk_application_prefers_app_menu().

@ -9,7 +9,7 @@ import "C"
import (
"unsafe"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/glib"
)
/*

@ -6,8 +6,8 @@ import "C"
import (
"unsafe"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/gdk"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/gdk"
"github.com/gotk3/gotk3/glib"
)
func init() {

@ -7,7 +7,7 @@ import (
"errors"
"unsafe"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/glib"
)
func init() {

@ -56,9 +56,9 @@ import (
"sync"
"unsafe"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/cairo"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/gdk"
"github.com/subgraph/fw-daemon/Godeps/_workspace/src/github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/cairo"
"github.com/gotk3/gotk3/gdk"
"github.com/gotk3/gotk3/glib"
)
func init() {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save