Movatterモバイル変換


[0]ホーム

URL:


keep

package
v0.257.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:18Imported by:1

Details

Repository

github.com/googleapis/google-api-go-client

Links

Documentation

Overview

Package keep provides access to the Google Keep API.

For product documentation, see:https://developers.google.com/workspace/keep/api

Library status

These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.

When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/keep/v1"...ctx := context.Background()keepService, err := keep.NewService(ctx)

In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

By default, all available scopes (see "Constants") are used to authenticate.To restrict scopes, usegoogle.golang.org/api/option.WithScopes:

keepService, err := keep.NewService(ctx, option.WithScopes(keep.KeepReadonlyScope))

To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:

keepService, err := keep.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)keepService, err := keep.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

Seegoogle.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (// See, edit, create and permanently delete all your Google Keep dataKeepScope = "https://www.googleapis.com/auth/keep"// View all your Google Keep dataKeepReadonlyScope = "https://www.googleapis.com/auth/keep.readonly")

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

typeAttachment

type Attachment struct {// MimeType: The MIME types (IANA media types) in which the attachment is// available.MimeType []string `json:"mimeType,omitempty"`// Name: The resource name;Namestring `json:"name,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "MimeType") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "MimeType") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Attachment: An attachment to a note.

func (Attachment)MarshalJSON

func (sAttachment) MarshalJSON() ([]byte,error)

typeBatchCreatePermissionsRequest

type BatchCreatePermissionsRequest struct {// Requests: The request message specifying the resources to create.Requests []*CreatePermissionRequest `json:"requests,omitempty"`// ForceSendFields is a list of field names (e.g. "Requests") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Requests") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

BatchCreatePermissionsRequest: The request to add one or more permissions onthe note. Currently, only the `WRITER` role may be specified. If adding apermission fails, then the entire request fails and no changes are made.

func (BatchCreatePermissionsRequest)MarshalJSON

func (sBatchCreatePermissionsRequest) MarshalJSON() ([]byte,error)

typeBatchCreatePermissionsResponse

type BatchCreatePermissionsResponse struct {// Permissions: Permissions created.Permissions []*Permission `json:"permissions,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Permissions") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Permissions") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

BatchCreatePermissionsResponse: The response for creating permissions on anote.

func (BatchCreatePermissionsResponse)MarshalJSON

func (sBatchCreatePermissionsResponse) MarshalJSON() ([]byte,error)

typeBatchDeletePermissionsRequest

type BatchDeletePermissionsRequest struct {// Names: Required. The names of the permissions to delete. Format:// `notes/{note}/permissions/{permission}`Names []string `json:"names,omitempty"`// ForceSendFields is a list of field names (e.g. "Names") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Names") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

BatchDeletePermissionsRequest: The request to remove one or more permissionsfrom a note. A permission with the `OWNER` role can't be removed. Ifremoving a permission fails, then the entire request fails and no changesare made. Returns a 400 bad request error if a specified permission does notexist on the note.

func (BatchDeletePermissionsRequest)MarshalJSON

func (sBatchDeletePermissionsRequest) MarshalJSON() ([]byte,error)

typeCreatePermissionRequest

type CreatePermissionRequest struct {// Parent: Required. The parent note where this permission will be created.// Format: `notes/{note}`Parentstring `json:"parent,omitempty"`// Permission: Required. The permission to create. One of Permission.email,// User.email or Group.email must be supplied.Permission *Permission `json:"permission,omitempty"`// ForceSendFields is a list of field names (e.g. "Parent") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Parent") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

CreatePermissionRequest: The request to add a single permission on the note.

func (CreatePermissionRequest)MarshalJSON

func (sCreatePermissionRequest) MarshalJSON() ([]byte,error)

typeEmpty

type Empty struct {// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`}

Empty: A generic empty message that you can re-use to avoid definingduplicated empty messages in your APIs. A typical example is to use it asthe request or the response type of an API method. For instance: service Foo{ rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

typeFamily

type Family struct {}

Family: Describes a single Google Family.

typeGroup

type Group struct {// Email: The group email.Emailstring `json:"email,omitempty"`// ForceSendFields is a list of field names (e.g. "Email") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Email") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Group: Describes a single Group.

func (Group)MarshalJSON

func (sGroup) MarshalJSON() ([]byte,error)

typeListContent

type ListContent struct {// ListItems: The items in the list. The number of items must be less than// 1,000.ListItems []*ListItem `json:"listItems,omitempty"`// ForceSendFields is a list of field names (e.g. "ListItems") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ListItems") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListContent: The list of items for a single list note.

func (ListContent)MarshalJSON

func (sListContent) MarshalJSON() ([]byte,error)

typeListItem

type ListItem struct {// Checked: Whether this item has been checked off or not.Checkedbool `json:"checked,omitempty"`// ChildListItems: If set, list of list items nested under this list item. Only// one level of nesting is allowed.ChildListItems []*ListItem `json:"childListItems,omitempty"`// Text: The text of this item. Length must be less than 1,000 characters.Text *TextContent `json:"text,omitempty"`// ForceSendFields is a list of field names (e.g. "Checked") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Checked") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListItem: A single list item in a note's list.

func (ListItem)MarshalJSON

func (sListItem) MarshalJSON() ([]byte,error)

typeListNotesResponse

type ListNotesResponse struct {// NextPageToken: Next page's `page_token` field.NextPageTokenstring `json:"nextPageToken,omitempty"`// Notes: A page of notes.Notes []*Note `json:"notes,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListNotesResponse: The response when listing a page of notes.

func (ListNotesResponse)MarshalJSON

func (sListNotesResponse) MarshalJSON() ([]byte,error)

typeMediaDownloadCall

type MediaDownloadCall struct {// contains filtered or unexported fields}

func (*MediaDownloadCall)Context

Context sets the context to be used in this call's Do and Download methods.

func (*MediaDownloadCall)Do

Do executes the "keep.media.download" call.Any non-2xx status code is an error. Response headers are in either*Attachment.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*MediaDownloadCall)Download

func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response,error)

Download fetches the API endpoint's "media" value, instead of the normalAPI response value. If the returned error is nil, the Response is guaranteed tohave a 2xx status code. Callers must close the Response.Body as usual.

func (*MediaDownloadCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*MediaDownloadCall)Header

func (c *MediaDownloadCall) Header()http.Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*MediaDownloadCall)IfNoneMatch

func (c *MediaDownloadCall) IfNoneMatch(entityTagstring) *MediaDownloadCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*MediaDownloadCall)MimeType

func (c *MediaDownloadCall) MimeType(mimeTypestring) *MediaDownloadCall

MimeType sets the optional parameter "mimeType": The IANA MIME type formatrequested. The requested MIME type must be one specified in theattachment.mime_type. Required when downloading attachment media and ignoredotherwise.

typeMediaService

type MediaService struct {// contains filtered or unexported fields}

funcNewMediaService

func NewMediaService(s *Service) *MediaService

func (*MediaService)Download

func (r *MediaService) Download(namestring) *MediaDownloadCall

Download: Gets an attachment. To download attachment media via REST requiresthe alt=media query parameter. Returns a 400 bad request error if attachmentmedia is not available in the requested MIME type.

- name: The name of the attachment.

typeNote

type Note struct {// Attachments: Output only. The attachments attached to this note.Attachments []*Attachment `json:"attachments,omitempty"`// Body: The body of the note.Body *Section `json:"body,omitempty"`// CreateTime: Output only. When this note was created.CreateTimestring `json:"createTime,omitempty"`// Name: Output only. The resource name of this note. See general note on// identifiers in KeepService.Namestring `json:"name,omitempty"`// Permissions: Output only. The list of permissions set on the note. Contains// at least one entry for the note owner.Permissions []*Permission `json:"permissions,omitempty"`// Title: The title of the note. Length must be less than 1,000 characters.Titlestring `json:"title,omitempty"`// TrashTime: Output only. When this note was trashed. If `trashed`, the note// is eventually deleted. If the note is not trashed, this field is not set// (and the trashed field is `false`).TrashTimestring `json:"trashTime,omitempty"`// Trashed: Output only. `true` if this note has been trashed. If trashed, the// note is eventually deleted.Trashedbool `json:"trashed,omitempty"`// UpdateTime: Output only. When this note was last modified.UpdateTimestring `json:"updateTime,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Attachments") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Attachments") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Note: A single note.

func (Note)MarshalJSON

func (sNote) MarshalJSON() ([]byte,error)

typeNotesCreateCall

type NotesCreateCall struct {// contains filtered or unexported fields}

func (*NotesCreateCall)Context

Context sets the context to be used in this call's Do method.

func (*NotesCreateCall)Do

func (c *NotesCreateCall) Do(opts ...googleapi.CallOption) (*Note,error)

Do executes the "keep.notes.create" call.Any non-2xx status code is an error. Response headers are in either*Note.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*NotesCreateCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*NotesCreateCall)Header

func (c *NotesCreateCall) Header()http.Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeNotesDeleteCall

type NotesDeleteCall struct {// contains filtered or unexported fields}

func (*NotesDeleteCall)Context

Context sets the context to be used in this call's Do method.

func (*NotesDeleteCall)Do

Do executes the "keep.notes.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*NotesDeleteCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*NotesDeleteCall)Header

func (c *NotesDeleteCall) Header()http.Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeNotesGetCall

type NotesGetCall struct {// contains filtered or unexported fields}

func (*NotesGetCall)Context

func (c *NotesGetCall) Context(ctxcontext.Context) *NotesGetCall

Context sets the context to be used in this call's Do method.

func (*NotesGetCall)Do

func (c *NotesGetCall) Do(opts ...googleapi.CallOption) (*Note,error)

Do executes the "keep.notes.get" call.Any non-2xx status code is an error. Response headers are in either*Note.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*NotesGetCall)Fields

func (c *NotesGetCall) Fields(s ...googleapi.Field) *NotesGetCall

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*NotesGetCall)Header

func (c *NotesGetCall) Header()http.Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*NotesGetCall)IfNoneMatch

func (c *NotesGetCall) IfNoneMatch(entityTagstring) *NotesGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeNotesListCall

type NotesListCall struct {// contains filtered or unexported fields}

func (*NotesListCall)Context

Context sets the context to be used in this call's Do method.

func (*NotesListCall)Do

Do executes the "keep.notes.list" call.Any non-2xx status code is an error. Response headers are in either*ListNotesResponse.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.

func (*NotesListCall)Fields

func (c *NotesListCall) Fields(s ...googleapi.Field) *NotesListCall

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*NotesListCall)Filter

func (c *NotesListCall) Filter(filterstring) *NotesListCall

Filter sets the optional parameter "filter": Filter for list results. If nofilter is supplied, the `trashed` filter is applied by default. Valid fieldsto filter by are: `create_time`, `update_time`, `trash_time`, and `trashed`.Filter syntax follows the Google AIP filtering spec (https://aip.dev/160).

func (*NotesListCall)Header

func (c *NotesListCall) Header()http.Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*NotesListCall)IfNoneMatch

func (c *NotesListCall) IfNoneMatch(entityTagstring) *NotesListCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*NotesListCall)PageSize

func (c *NotesListCall) PageSize(pageSizeint64) *NotesListCall

PageSize sets the optional parameter "pageSize": The maximum number ofresults to return.

func (*NotesListCall)PageToken

func (c *NotesListCall) PageToken(pageTokenstring) *NotesListCall

PageToken sets the optional parameter "pageToken": The previous page's`next_page_token` field.

func (*NotesListCall)Pages

Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.

typeNotesPermissionsBatchCreateCall

type NotesPermissionsBatchCreateCall struct {// contains filtered or unexported fields}

func (*NotesPermissionsBatchCreateCall)Context

Context sets the context to be used in this call's Do method.

func (*NotesPermissionsBatchCreateCall)Do

Do executes the "keep.notes.permissions.batchCreate" call.Any non-2xx status code is an error. Response headers are in either*BatchCreatePermissionsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*NotesPermissionsBatchCreateCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*NotesPermissionsBatchCreateCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeNotesPermissionsBatchDeleteCall

type NotesPermissionsBatchDeleteCall struct {// contains filtered or unexported fields}

func (*NotesPermissionsBatchDeleteCall)Context

Context sets the context to be used in this call's Do method.

func (*NotesPermissionsBatchDeleteCall)Do

Do executes the "keep.notes.permissions.batchDelete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*NotesPermissionsBatchDeleteCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*NotesPermissionsBatchDeleteCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeNotesPermissionsService

type NotesPermissionsService struct {// contains filtered or unexported fields}

funcNewNotesPermissionsService

func NewNotesPermissionsService(s *Service) *NotesPermissionsService

func (*NotesPermissionsService)BatchCreate

func (r *NotesPermissionsService) BatchCreate(parentstring, batchcreatepermissionsrequest *BatchCreatePermissionsRequest) *NotesPermissionsBatchCreateCall

BatchCreate: Creates one or more permissions on the note. Only permissionswith the `WRITER` role may be created. If adding any permission fails, thenthe entire request fails and no changes are made.

  • parent: The parent resource shared by all Permissions being created.Format: `notes/{note}` If this is set, the parent field in theCreatePermission messages must either be empty or match this field.

func (*NotesPermissionsService)BatchDelete

func (r *NotesPermissionsService) BatchDelete(parentstring, batchdeletepermissionsrequest *BatchDeletePermissionsRequest) *NotesPermissionsBatchDeleteCall

BatchDelete: Deletes one or more permissions on the note. The specifiedentities will immediately lose access. A permission with the `OWNER` rolecan't be removed. If removing a permission fails, then the entire requestfails and no changes are made. Returns a 400 bad request error if aspecified permission does not exist on the note.

  • parent: The parent resource shared by all permissions being deleted.Format: `notes/{note}` If this is set, the parent of all of thepermissions specified in the DeletePermissionRequest messages must matchthis field.

typeNotesService

type NotesService struct {Permissions *NotesPermissionsService// contains filtered or unexported fields}

funcNewNotesService

func NewNotesService(s *Service) *NotesService

func (*NotesService)Create

func (r *NotesService) Create(note *Note) *NotesCreateCall

Create: Creates a new note.

func (*NotesService)Delete

func (r *NotesService) Delete(namestring) *NotesDeleteCall

Delete: Deletes a note. Caller must have the `OWNER` role on the note todelete. Deleting a note removes the resource immediately and cannot beundone. Any collaborators will lose access to the note.

- name: Name of the note to delete.

func (*NotesService)Get

func (r *NotesService) Get(namestring) *NotesGetCall

Get: Gets a note.

- name: Name of the resource.

func (*NotesService)List

func (r *NotesService) List() *NotesListCall

List: Lists notes. Every list call returns a page of results with`page_size` as the upper bound of returned items. A `page_size` of zeroallows the server to choose the upper bound. The ListNotesResponse containsat most `page_size` entries. If there are more things left to list, itprovides a `next_page_token` value. (Page tokens are opaque values.) To getthe next page of results, copy the result's `next_page_token` into the nextrequest's `page_token`. Repeat until the `next_page_token` returned with apage of results is empty. ListNotes return consistent results in the face ofconcurrent changes, or signals that it cannot with an ABORTED error.

typePermission

type Permission struct {// Deleted: Output only. Whether this member has been deleted. If the member is// recovered, this value is set to false and the recovered member retains the// role on the note.Deletedbool `json:"deleted,omitempty"`// Email: The email associated with the member. If set on create, the `email`// field in the `User` or `Group` message must either be empty or match this// field. On read, may be unset if the member does not have an associated// email.Emailstring `json:"email,omitempty"`// Family: Output only. The Google Family to which this role applies.Family *Family `json:"family,omitempty"`// Group: Output only. The group to which this role applies.Group *Group `json:"group,omitempty"`// Name: Output only. The resource name.Namestring `json:"name,omitempty"`// Role: The role granted by this permission. The role determines the// entity’s ability to read, write, and share notes.//// Possible values://   "ROLE_UNSPECIFIED" - An undefined role.//   "OWNER" - A role granting full access. This role cannot be added or// removed. Defined by the creator of the note.//   "WRITER" - A role granting the ability to contribute content and modify// note permissions.Rolestring `json:"role,omitempty"`// User: Output only. The user to whom this role applies.User *User `json:"user,omitempty"`// ForceSendFields is a list of field names (e.g. "Deleted") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Deleted") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Permission: A single permission on the note. Associates a `member` with a`role`.

func (Permission)MarshalJSON

func (sPermission) MarshalJSON() ([]byte,error)

typeSection

type Section struct {// List: Used if this section's content is a list.List *ListContent `json:"list,omitempty"`// Text: Used if this section's content is a block of text. The length of the// text content must be less than 20,000 characters.Text *TextContent `json:"text,omitempty"`// ForceSendFields is a list of field names (e.g. "List") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "List") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Section: The content of the note.

func (Section)MarshalJSON

func (sSection) MarshalJSON() ([]byte,error)

typeService

type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentMedia *MediaServiceNotes *NotesService// contains filtered or unexported fields}

funcNewdeprecated

func New(client *http.Client) (*Service,error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

funcNewService

func NewService(ctxcontext.Context, opts ...option.ClientOption) (*Service,error)

NewService creates a new Service.

typeTextContent

type TextContent struct {// Text: The text of the note. The limits on this vary with the specific field// using this type.Textstring `json:"text,omitempty"`// ForceSendFields is a list of field names (e.g. "Text") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Text") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

TextContent: The block of text for a single text section or list item.

func (TextContent)MarshalJSON

func (sTextContent) MarshalJSON() ([]byte,error)

typeUser

type User struct {// Email: The user's email.Emailstring `json:"email,omitempty"`// ForceSendFields is a list of field names (e.g. "Email") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Email") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

User: Describes a single user.

func (User)MarshalJSON

func (sUser) MarshalJSON() ([]byte,error)

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp