docs modification

This commit is contained in:
brent s. 2021-12-13 00:40:11 -05:00
parent d81452a92c
commit b02aa9877c
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
2 changed files with 13 additions and 7 deletions

View File

@ -1,10 +1,10 @@
package gosecret

import (
`strings`
"strings"
"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.

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) {


View File

@ -19,10 +19,7 @@ const (
// DbusPrompterInterface is an interface for issuing a Prompt. Yes, it should be doubled up like that.
DbusPrompterInterface string = DbusServiceBase + ".Prompt.Prompt"
/*
DbusDefaultItemType is the default type to use for Item.Type.
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 is the default type to use for Item.Type/Collection.CreateItem.
*/
DbusDefaultItemType string = DbusServiceBase + ".Generic"
)