admin

package
v0.0.0-...-2824937 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package admin is a generated protocol buffer package.

It is generated from these files:

google/firestore/admin/v1beta1/firestore_admin.proto
google/firestore/admin/v1beta1/index.proto

It has these top-level messages:

IndexOperationMetadata
Progress
CreateIndexRequest
GetIndexRequest
ListIndexesRequest
DeleteIndexRequest
ListIndexesResponse
IndexField
Index

Index

Constants

This section is empty.

Variables

View Source
var IndexField_Mode_name = map[int32]string{
	0: "MODE_UNSPECIFIED",
	2: "ASCENDING",
	3: "DESCENDING",
}
View Source
var IndexField_Mode_value = map[string]int32{
	"MODE_UNSPECIFIED": 0,
	"ASCENDING":        2,
	"DESCENDING":       3,
}
View Source
var IndexOperationMetadata_OperationType_name = map[int32]string{
	0: "OPERATION_TYPE_UNSPECIFIED",
	1: "CREATING_INDEX",
}
View Source
var IndexOperationMetadata_OperationType_value = map[string]int32{
	"OPERATION_TYPE_UNSPECIFIED": 0,
	"CREATING_INDEX":             1,
}
View Source
var Index_State_name = map[int32]string{
	0: "STATE_UNSPECIFIED",
	3: "CREATING",
	2: "READY",
	5: "ERROR",
}
View Source
var Index_State_value = map[string]int32{
	"STATE_UNSPECIFIED": 0,
	"CREATING":          3,
	"READY":             2,
	"ERROR":             5,
}

Functions

func RegisterFirestoreAdminServer

func RegisterFirestoreAdminServer(s *grpc.Server, srv FirestoreAdminServer)

Types

type CreateIndexRequest

type CreateIndexRequest struct {
	// The name of the database this index will apply to. For example:
	// `projects/{project_id}/databases/{database_id}`
	Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
	// The index to create. The name and state fields are output only and will be
	// ignored. Certain single field indexes cannot be created or deleted.
	Index *Index `protobuf:"bytes,2,opt,name=index" json:"index,omitempty"`
}

The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta1.FirestoreAdmin.CreateIndex].

func (*CreateIndexRequest) Descriptor

func (*CreateIndexRequest) Descriptor() ([]byte, []int)

func (*CreateIndexRequest) GetIndex

func (m *CreateIndexRequest) GetIndex() *Index

func (*CreateIndexRequest) GetParent

func (m *CreateIndexRequest) GetParent() string

func (*CreateIndexRequest) ProtoMessage

func (*CreateIndexRequest) ProtoMessage()

func (*CreateIndexRequest) Reset

func (m *CreateIndexRequest) Reset()

func (*CreateIndexRequest) String

func (m *CreateIndexRequest) String() string

type DeleteIndexRequest

type DeleteIndexRequest struct {
	// The index name. For example:
	// `projects/{project_id}/databases/{database_id}/indexes/{index_id}`
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1beta1.FirestoreAdmin.DeleteIndex].

func (*DeleteIndexRequest) Descriptor

func (*DeleteIndexRequest) Descriptor() ([]byte, []int)

func (*DeleteIndexRequest) GetName

func (m *DeleteIndexRequest) GetName() string

func (*DeleteIndexRequest) ProtoMessage

func (*DeleteIndexRequest) ProtoMessage()

func (*DeleteIndexRequest) Reset

func (m *DeleteIndexRequest) Reset()

func (*DeleteIndexRequest) String

func (m *DeleteIndexRequest) String() string

type FirestoreAdminClient

type FirestoreAdminClient interface {
	// Creates the specified index.
	// A newly created index's initial state is `CREATING`. On completion of the
	// returned [google.longrunning.Operation][google.longrunning.Operation], the state will be `READY`.
	// If the index already exists, the call will return an `ALREADY_EXISTS`
	// status.
	//
	// During creation, the process could result in an error, in which case the
	// index will move to the `ERROR` state. The process can be recovered by
	// fixing the data that caused the error, removing the index with
	// [delete][google.firestore.admin.v1beta1.FirestoreAdmin.DeleteIndex], then re-creating the index with
	// [create][google.firestore.admin.v1beta1.FirestoreAdmin.CreateIndex].
	//
	// Indexes with a single field cannot be created.
	CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*google_longrunning.Operation, error)
	// Lists the indexes that match the specified filters.
	ListIndexes(ctx context.Context, in *ListIndexesRequest, opts ...grpc.CallOption) (*ListIndexesResponse, error)
	// Gets an index.
	GetIndex(ctx context.Context, in *GetIndexRequest, opts ...grpc.CallOption) (*Index, error)
	// Deletes an index.
	DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
}

func NewFirestoreAdminClient

func NewFirestoreAdminClient(cc *grpc.ClientConn) FirestoreAdminClient

type FirestoreAdminServer

type FirestoreAdminServer interface {
	// Creates the specified index.
	// A newly created index's initial state is `CREATING`. On completion of the
	// returned [google.longrunning.Operation][google.longrunning.Operation], the state will be `READY`.
	// If the index already exists, the call will return an `ALREADY_EXISTS`
	// status.
	//
	// During creation, the process could result in an error, in which case the
	// index will move to the `ERROR` state. The process can be recovered by
	// fixing the data that caused the error, removing the index with
	// [delete][google.firestore.admin.v1beta1.FirestoreAdmin.DeleteIndex], then re-creating the index with
	// [create][google.firestore.admin.v1beta1.FirestoreAdmin.CreateIndex].
	//
	// Indexes with a single field cannot be created.
	CreateIndex(context.Context, *CreateIndexRequest) (*google_longrunning.Operation, error)
	// Lists the indexes that match the specified filters.
	ListIndexes(context.Context, *ListIndexesRequest) (*ListIndexesResponse, error)
	// Gets an index.
	GetIndex(context.Context, *GetIndexRequest) (*Index, error)
	// Deletes an index.
	DeleteIndex(context.Context, *DeleteIndexRequest) (*google_protobuf2.Empty, error)
}

type GetIndexRequest

type GetIndexRequest struct {
	// The name of the index. For example:
	// `projects/{project_id}/databases/{database_id}/indexes/{index_id}`
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1beta1.FirestoreAdmin.GetIndex].

func (*GetIndexRequest) Descriptor

func (*GetIndexRequest) Descriptor() ([]byte, []int)

func (*GetIndexRequest) GetName

func (m *GetIndexRequest) GetName() string

func (*GetIndexRequest) ProtoMessage

func (*GetIndexRequest) ProtoMessage()

func (*GetIndexRequest) Reset

func (m *GetIndexRequest) Reset()

func (*GetIndexRequest) String

func (m *GetIndexRequest) String() string

type Index

type Index struct {
	// The resource name of the index.
	// Output only.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The collection ID to which this index applies. Required.
	CollectionId string `protobuf:"bytes,2,opt,name=collection_id,json=collectionId" json:"collection_id,omitempty"`
	// The fields to index.
	Fields []*IndexField `protobuf:"bytes,3,rep,name=fields" json:"fields,omitempty"`
	// The state of the index.
	// Output only.
	State Index_State `protobuf:"varint,6,opt,name=state,enum=google.firestore.admin.v1beta1.Index_State" json:"state,omitempty"`
}

An index definition.

func (*Index) Descriptor

func (*Index) Descriptor() ([]byte, []int)

func (*Index) GetCollectionId

func (m *Index) GetCollectionId() string

func (*Index) GetFields

func (m *Index) GetFields() []*IndexField

func (*Index) GetName

func (m *Index) GetName() string

func (*Index) GetState

func (m *Index) GetState() Index_State

func (*Index) ProtoMessage

func (*Index) ProtoMessage()

func (*Index) Reset

func (m *Index) Reset()

func (*Index) String

func (m *Index) String() string

type IndexField

type IndexField struct {
	// The path of the field. Must match the field path specification described
	// by [google.firestore.v1beta1.Document.fields][fields].
	// Special field path `__name__` may be used by itself or at the end of a
	// path. `__type__` may be used only at the end of path.
	FieldPath string `protobuf:"bytes,1,opt,name=field_path,json=fieldPath" json:"field_path,omitempty"`
	// The field's mode.
	Mode IndexField_Mode `protobuf:"varint,2,opt,name=mode,enum=google.firestore.admin.v1beta1.IndexField_Mode" json:"mode,omitempty"`
}

A field of an index.

func (*IndexField) Descriptor

func (*IndexField) Descriptor() ([]byte, []int)

func (*IndexField) GetFieldPath

func (m *IndexField) GetFieldPath() string

func (*IndexField) GetMode

func (m *IndexField) GetMode() IndexField_Mode

func (*IndexField) ProtoMessage

func (*IndexField) ProtoMessage()

func (*IndexField) Reset

func (m *IndexField) Reset()

func (*IndexField) String

func (m *IndexField) String() string

type IndexField_Mode

type IndexField_Mode int32

The mode determines how a field is indexed.

const (
	// The mode is unspecified.
	IndexField_MODE_UNSPECIFIED IndexField_Mode = 0
	// The field's values are indexed so as to support sequencing in
	// ascending order and also query by <, >, <=, >=, and =.
	IndexField_ASCENDING IndexField_Mode = 2
	// The field's values are indexed so as to support sequencing in
	// descending order and also query by <, >, <=, >=, and =.
	IndexField_DESCENDING IndexField_Mode = 3
)

func (IndexField_Mode) EnumDescriptor

func (IndexField_Mode) EnumDescriptor() ([]byte, []int)

func (IndexField_Mode) String

func (x IndexField_Mode) String() string

type IndexOperationMetadata

type IndexOperationMetadata struct {
	// The time that work began on the operation.
	StartTime *google_protobuf3.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
	// The time the operation ended, either successfully or otherwise. Unset if
	// the operation is still active.
	EndTime *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
	// The index resource that this operation is acting on. For example:
	// `projects/{project_id}/databases/{database_id}/indexes/{index_id}`
	Index string `protobuf:"bytes,3,opt,name=index" json:"index,omitempty"`
	// The type of index operation.
	OperationType IndexOperationMetadata_OperationType `` /* 167-byte string literal not displayed */
	// True if the [google.longrunning.Operation] was cancelled. If the
	// cancellation is in progress, cancelled will be true but
	// [google.longrunning.Operation.done][google.longrunning.Operation.done] will be false.
	Cancelled bool `protobuf:"varint,5,opt,name=cancelled" json:"cancelled,omitempty"`
	// Progress of the existing operation, measured in number of documents.
	DocumentProgress *Progress `protobuf:"bytes,6,opt,name=document_progress,json=documentProgress" json:"document_progress,omitempty"`
}

Metadata for index operations. This metadata populates the metadata field of [google.longrunning.Operation][google.longrunning.Operation].

func (*IndexOperationMetadata) Descriptor

func (*IndexOperationMetadata) Descriptor() ([]byte, []int)

func (*IndexOperationMetadata) GetCancelled

func (m *IndexOperationMetadata) GetCancelled() bool

func (*IndexOperationMetadata) GetDocumentProgress

func (m *IndexOperationMetadata) GetDocumentProgress() *Progress

func (*IndexOperationMetadata) GetEndTime

func (*IndexOperationMetadata) GetIndex

func (m *IndexOperationMetadata) GetIndex() string

func (*IndexOperationMetadata) GetOperationType

func (*IndexOperationMetadata) GetStartTime

func (*IndexOperationMetadata) ProtoMessage

func (*IndexOperationMetadata) ProtoMessage()

func (*IndexOperationMetadata) Reset

func (m *IndexOperationMetadata) Reset()

func (*IndexOperationMetadata) String

func (m *IndexOperationMetadata) String() string

type IndexOperationMetadata_OperationType

type IndexOperationMetadata_OperationType int32

The type of index operation.

const (
	// Unspecified. Never set by server.
	IndexOperationMetadata_OPERATION_TYPE_UNSPECIFIED IndexOperationMetadata_OperationType = 0
	// The operation is creating the index. Initiated by a `CreateIndex` call.
	IndexOperationMetadata_CREATING_INDEX IndexOperationMetadata_OperationType = 1
)

func (IndexOperationMetadata_OperationType) EnumDescriptor

func (IndexOperationMetadata_OperationType) EnumDescriptor() ([]byte, []int)

func (IndexOperationMetadata_OperationType) String

type Index_State

type Index_State int32

The state of an index. During index creation, an index will be in the `CREATING` state. If the index is created successfully, it will transition to the `READY` state. If the index is not able to be created, it will transition to the `ERROR` state.

const (
	// The state is unspecified.
	Index_STATE_UNSPECIFIED Index_State = 0
	// The index is being created.
	// There is an active long-running operation for the index.
	// The index is updated when writing a document.
	// Some index data may exist.
	Index_CREATING Index_State = 3
	// The index is ready to be used.
	// The index is updated when writing a document.
	// The index is fully populated from all stored documents it applies to.
	Index_READY Index_State = 2
	// The index was being created, but something went wrong.
	// There is no active long-running operation for the index,
	// and the most recently finished long-running operation failed.
	// The index is not updated when writing a document.
	// Some index data may exist.
	Index_ERROR Index_State = 5
)

func (Index_State) EnumDescriptor

func (Index_State) EnumDescriptor() ([]byte, []int)

func (Index_State) String

func (x Index_State) String() string

type ListIndexesRequest

type ListIndexesRequest struct {
	// The database name. For example:
	// `projects/{project_id}/databases/{database_id}`
	Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
	Filter string `protobuf:"bytes,2,opt,name=filter" json:"filter,omitempty"`
	// The standard List page size.
	PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
	// The standard List page token.
	PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
}

The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta1.FirestoreAdmin.ListIndexes].

func (*ListIndexesRequest) Descriptor

func (*ListIndexesRequest) Descriptor() ([]byte, []int)

func (*ListIndexesRequest) GetFilter

func (m *ListIndexesRequest) GetFilter() string

func (*ListIndexesRequest) GetPageSize

func (m *ListIndexesRequest) GetPageSize() int32

func (*ListIndexesRequest) GetPageToken

func (m *ListIndexesRequest) GetPageToken() string

func (*ListIndexesRequest) GetParent

func (m *ListIndexesRequest) GetParent() string

func (*ListIndexesRequest) ProtoMessage

func (*ListIndexesRequest) ProtoMessage()

func (*ListIndexesRequest) Reset

func (m *ListIndexesRequest) Reset()

func (*ListIndexesRequest) String

func (m *ListIndexesRequest) String() string

type ListIndexesResponse

type ListIndexesResponse struct {
	// The indexes.
	Indexes []*Index `protobuf:"bytes,1,rep,name=indexes" json:"indexes,omitempty"`
	// The standard List next-page token.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}

The response for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta1.FirestoreAdmin.ListIndexes].

func (*ListIndexesResponse) Descriptor

func (*ListIndexesResponse) Descriptor() ([]byte, []int)

func (*ListIndexesResponse) GetIndexes

func (m *ListIndexesResponse) GetIndexes() []*Index

func (*ListIndexesResponse) GetNextPageToken

func (m *ListIndexesResponse) GetNextPageToken() string

func (*ListIndexesResponse) ProtoMessage

func (*ListIndexesResponse) ProtoMessage()

func (*ListIndexesResponse) Reset

func (m *ListIndexesResponse) Reset()

func (*ListIndexesResponse) String

func (m *ListIndexesResponse) String() string

type Progress

type Progress struct {
	// An estimate of how much work has been completed. Note that this may be
	// greater than `work_estimated`.
	WorkCompleted int64 `protobuf:"varint,1,opt,name=work_completed,json=workCompleted" json:"work_completed,omitempty"`
	// An estimate of how much work needs to be performed. Zero if the
	// work estimate is unavailable. May change as work progresses.
	WorkEstimated int64 `protobuf:"varint,2,opt,name=work_estimated,json=workEstimated" json:"work_estimated,omitempty"`
}

Measures the progress of a particular metric.

func (*Progress) Descriptor

func (*Progress) Descriptor() ([]byte, []int)

func (*Progress) GetWorkCompleted

func (m *Progress) GetWorkCompleted() int64

func (*Progress) GetWorkEstimated

func (m *Progress) GetWorkEstimated() int64

func (*Progress) ProtoMessage

func (*Progress) ProtoMessage()

func (*Progress) Reset

func (m *Progress) Reset()

func (*Progress) String

func (m *Progress) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL