docs modification
This commit is contained in:
parent
d81452a92c
commit
b02aa9877c
@ -1,10 +1,10 @@
|
|||||||
package gosecret
|
package gosecret
|
||||||
|
|
||||||
import (
|
import (
|
||||||
`strings`
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
`github.com/godbus/dbus/v5`
|
"github.com/godbus/dbus/v5"
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -46,7 +46,16 @@ func NewCollection(service *Service, path dbus.ObjectPath) (coll *Collection, er
|
|||||||
whether any existing secret with the same label should be replaced or not, and the optional itemType.
|
whether any existing secret with the same label should be replaced or not, and the optional itemType.
|
||||||
|
|
||||||
itemType is optional; if specified, it should be a Dbus interface (only the first element is used).
|
itemType is optional; if specified, it should be a Dbus interface (only the first element is used).
|
||||||
If not specified, the default DbusDefaultItemType will be used.
|
If not specified, the default DbusDefaultItemType will be used. The most common itemType is DbusDefaultItemType
|
||||||
|
and is the current recommendation.
|
||||||
|
Other types used are:
|
||||||
|
|
||||||
|
org.gnome.keyring.NetworkPassword
|
||||||
|
org.gnome.keyring.Note
|
||||||
|
|
||||||
|
These are libsecret schemas as defined at
|
||||||
|
https://gitlab.gnome.org/GNOME/libsecret/-/blob/master/libsecret/secret-schemas.c (and bundled in with libsecret).
|
||||||
|
Support for adding custom schemas MAY come in the future but is unsupported currently.
|
||||||
*/
|
*/
|
||||||
func (c *Collection) CreateItem(label string, attrs map[string]string, secret *Secret, replace bool, itemType ...string) (item *Item, err error) {
|
func (c *Collection) CreateItem(label string, attrs map[string]string, secret *Secret, replace bool, itemType ...string) (item *Item, err error) {
|
||||||
|
|
||||||
|
@ -19,10 +19,7 @@ const (
|
|||||||
// DbusPrompterInterface is an interface for issuing a Prompt. Yes, it should be doubled up like that.
|
// DbusPrompterInterface is an interface for issuing a Prompt. Yes, it should be doubled up like that.
|
||||||
DbusPrompterInterface string = DbusServiceBase + ".Prompt.Prompt"
|
DbusPrompterInterface string = DbusServiceBase + ".Prompt.Prompt"
|
||||||
/*
|
/*
|
||||||
DbusDefaultItemType is the default type to use for Item.Type.
|
DbusDefaultItemType is the default type to use for Item.Type/Collection.CreateItem.
|
||||||
I've only ever seen "org.gnome.keyring.NetworkPassword" in the wild
|
|
||||||
aside from the below. It may be legacy (gnome-keyring is obsoleted by SecretService).
|
|
||||||
If in doubt, the below is considered the "proper" interface.
|
|
||||||
*/
|
*/
|
||||||
DbusDefaultItemType string = DbusServiceBase + ".Generic"
|
DbusDefaultItemType string = DbusServiceBase + ".Generic"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user