gosecret/session_funcs.go
brent s a5b479ae4e
docs, workflow change
docs were updated, and going to be doing all primary (V1+) work in master branch.
when ready for a release, i'll merge it into that particular branch.
2021-11-27 02:24:22 -05:00

26 lines
536 B
Go

package gosecret
import (
`github.com/godbus/dbus`
)
// NewSession returns a pointer to a new Session based on a Dbus connection and a Dbus path.
func NewSession(conn *dbus.Conn, path dbus.ObjectPath) (session *Session) {
session = &Session{
Conn: conn,
Dbus: conn.Object(DbusService, path),
}
return
}
// Path returns the path of the underlying Dbus connection.
func (s Session) Path() (path dbus.ObjectPath) {
// Remove this method in V1. It's bloat since we now have an exported Dbus.
path = s.Dbus.Path()
return
}