utils

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const FirestoreCollectionAccounts = "accounts"

FirestoreCollectionAccounts is the Firestore collection name for documents of type utils.Account.

View Source
const FirestoreCollectionActions = "actions"

FirestoreCollectionActions is the Firestore collection name for documents of type utils.Action.

View Source
const FirestoreCollectionManifests = "manifests"

FirestoreCollectionManifests is the Firestore collection name for documents of type utils.Manifest.

View Source
const FirestoreCollectionSessions = "sessions"

FirestoreCollectionSessions is the Firestore collection name for documents of type utils.Session.

View Source
const FirestoreCollectionUsers = "users"

FirestoreCollectionUsers is the Firestore collection name for documents of type utils.User.

Variables

View Source
var File_utils_account_proto protoreflect.FileDescriptor
View Source
var File_utils_session_proto protoreflect.FileDescriptor
View Source
var File_utils_user_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Account

type Account struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func FirestoreMapToAccount

func FirestoreMapToAccount(m map[string]any) (*Account, error)

func (*Account) Descriptor deprecated

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

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetName

func (x *Account) GetName() string

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

func (x *Account) ProtoReflect() protoreflect.Message

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

func (*Account) ToFirestoreMap

func (x *Account) ToFirestoreMap() (map[string]any, error)

type Action

type Action struct {
	Id         string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Proto      []byte                 `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"`
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// contains filtered or unexported fields
}

func FirestoreMapToAction

func FirestoreMapToAction(m map[string]any) (*Action, error)

func (*Action) Descriptor deprecated

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

Deprecated: Use Action.ProtoReflect.Descriptor instead.

func (*Action) GetCreateTime

func (x *Action) GetCreateTime() *timestamppb.Timestamp

func (*Action) GetId

func (x *Action) GetId() string

func (*Action) GetProto

func (x *Action) GetProto() []byte

func (*Action) ProtoMessage

func (*Action) ProtoMessage()

func (*Action) ProtoReflect

func (x *Action) ProtoReflect() protoreflect.Message

func (*Action) Reset

func (x *Action) Reset()

func (*Action) String

func (x *Action) String() string

func (*Action) ToFirestoreMap

func (x *Action) ToFirestoreMap() (map[string]any, error)

type Firestore

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

func WithFirestore

func WithFirestore(client *firestore.Client) *Firestore

func (*Firestore) Accounts

func (fs *Firestore) Accounts() *FirestoreAccountsCollectionRef

func (*Firestore) Installations

func (fs *Firestore) Installations() *FirestoreInstallationsCollectionRef

type FirestoreAccountsCollectionRef

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

FirestoreAccountsCollectionRef holds a reference to the Firestore collection `accounts`.

func (*FirestoreAccountsCollectionRef) Doc

func (*FirestoreAccountsCollectionRef) Limit

func (*FirestoreAccountsCollectionRef) OrderBy

func (*FirestoreAccountsCollectionRef) Where

func (ref *FirestoreAccountsCollectionRef) Where(path, op string, value interface{}) *FirestoreAccountsQuery

type FirestoreAccountsDocumentRef

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

FirestoreAccountsDocumentRef holds a reference to a Firestore document in collection `accounts`.

func (*FirestoreAccountsDocumentRef) Delete

func (*FirestoreAccountsDocumentRef) Get

func (*FirestoreAccountsDocumentRef) Ref

func (*FirestoreAccountsDocumentRef) Set

func (*FirestoreAccountsDocumentRef) Users

type FirestoreAccountsIterator

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

func (*FirestoreAccountsIterator) GetAll

func (i *FirestoreAccountsIterator) GetAll() ([]*Account, error)

func (*FirestoreAccountsIterator) GetAllAsSnapshots

func (i *FirestoreAccountsIterator) GetAllAsSnapshots() ([]*firestore.DocumentSnapshot, error)

func (*FirestoreAccountsIterator) Next

func (i *FirestoreAccountsIterator) Next() (*Account, error)

func (*FirestoreAccountsIterator) NextAsSnapshot

func (*FirestoreAccountsIterator) Stop

func (i *FirestoreAccountsIterator) Stop()

type FirestoreAccountsQuery

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

func (*FirestoreAccountsQuery) Documents

func (*FirestoreAccountsQuery) First

func (*FirestoreAccountsQuery) Limit

func (*FirestoreAccountsQuery) OrderBy

func (*FirestoreAccountsQuery) Value

func (*FirestoreAccountsQuery) Where

func (q *FirestoreAccountsQuery) Where(path, op string, value interface{}) *FirestoreAccountsQuery

type FirestoreActionsCollectionRef

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

FirestoreActionsCollectionRef holds a reference to the Firestore collection `actions`.

func (*FirestoreActionsCollectionRef) Doc

func (*FirestoreActionsCollectionRef) Limit

func (*FirestoreActionsCollectionRef) OrderBy

func (*FirestoreActionsCollectionRef) Where

func (ref *FirestoreActionsCollectionRef) Where(path, op string, value interface{}) *FirestoreActionsQuery

type FirestoreActionsDocumentRef

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

FirestoreActionsDocumentRef holds a reference to a Firestore document in collection `actions`.

func (*FirestoreActionsDocumentRef) Delete

func (*FirestoreActionsDocumentRef) Get

func (*FirestoreActionsDocumentRef) Ref

func (*FirestoreActionsDocumentRef) Set

type FirestoreActionsIterator

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

func (*FirestoreActionsIterator) GetAll

func (i *FirestoreActionsIterator) GetAll() ([]*Action, error)

func (*FirestoreActionsIterator) GetAllAsSnapshots

func (i *FirestoreActionsIterator) GetAllAsSnapshots() ([]*firestore.DocumentSnapshot, error)

func (*FirestoreActionsIterator) Next

func (i *FirestoreActionsIterator) Next() (*Action, error)

func (*FirestoreActionsIterator) NextAsSnapshot

func (i *FirestoreActionsIterator) NextAsSnapshot() (*firestore.DocumentSnapshot, error)

func (*FirestoreActionsIterator) Stop

func (i *FirestoreActionsIterator) Stop()

type FirestoreActionsQuery

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

func (*FirestoreActionsQuery) Documents

func (*FirestoreActionsQuery) First

func (q *FirestoreActionsQuery) First(ctx context.Context) (*Action, error)

func (*FirestoreActionsQuery) Limit

func (*FirestoreActionsQuery) OrderBy

func (*FirestoreActionsQuery) Value

func (*FirestoreActionsQuery) Where

func (q *FirestoreActionsQuery) Where(path, op string, value interface{}) *FirestoreActionsQuery

type FirestoreInstallationsCollectionRef

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

FirestoreInstallationsCollectionRef holds a reference to the Firestore collection `installations`.

func (*FirestoreInstallationsCollectionRef) Doc

func (*FirestoreInstallationsCollectionRef) Limit

func (*FirestoreInstallationsCollectionRef) OrderBy

func (*FirestoreInstallationsCollectionRef) Where

func (ref *FirestoreInstallationsCollectionRef) Where(path, op string, value interface{}) *FirestoreInstallationsQuery

type FirestoreInstallationsDocumentRef

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

FirestoreInstallationsDocumentRef holds a reference to a Firestore document in collection `installations`.

func (*FirestoreInstallationsDocumentRef) Repositories

type FirestoreInstallationsIterator

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

func (*FirestoreInstallationsIterator) Stop

type FirestoreInstallationsQuery

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

func (*FirestoreInstallationsQuery) Documents

func (*FirestoreInstallationsQuery) Limit

func (*FirestoreInstallationsQuery) OrderBy

func (*FirestoreInstallationsQuery) Value

func (*FirestoreInstallationsQuery) Where

func (q *FirestoreInstallationsQuery) Where(path, op string, value interface{}) *FirestoreInstallationsQuery

type FirestoreManifestsCollectionRef

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

FirestoreManifestsCollectionRef holds a reference to the Firestore collection `manifests`.

func (*FirestoreManifestsCollectionRef) Doc

func (*FirestoreManifestsCollectionRef) Limit

func (*FirestoreManifestsCollectionRef) OrderBy

func (*FirestoreManifestsCollectionRef) Where

func (ref *FirestoreManifestsCollectionRef) Where(path, op string, value interface{}) *FirestoreManifestsQuery

type FirestoreManifestsDocumentRef

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

FirestoreManifestsDocumentRef holds a reference to a Firestore document in collection `manifests`.

func (*FirestoreManifestsDocumentRef) Actions

func (*FirestoreManifestsDocumentRef) Delete

func (*FirestoreManifestsDocumentRef) Get

func (*FirestoreManifestsDocumentRef) Ref

func (*FirestoreManifestsDocumentRef) Set

type FirestoreManifestsIterator

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

func (*FirestoreManifestsIterator) GetAll

func (i *FirestoreManifestsIterator) GetAll() ([]*Manifest, error)

func (*FirestoreManifestsIterator) GetAllAsSnapshots

func (i *FirestoreManifestsIterator) GetAllAsSnapshots() ([]*firestore.DocumentSnapshot, error)

func (*FirestoreManifestsIterator) Next

func (*FirestoreManifestsIterator) NextAsSnapshot

func (*FirestoreManifestsIterator) Stop

func (i *FirestoreManifestsIterator) Stop()

type FirestoreManifestsQuery

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

func (*FirestoreManifestsQuery) Documents

func (*FirestoreManifestsQuery) First

func (*FirestoreManifestsQuery) Limit

func (*FirestoreManifestsQuery) OrderBy

func (*FirestoreManifestsQuery) Value

func (*FirestoreManifestsQuery) Where

func (q *FirestoreManifestsQuery) Where(path, op string, value interface{}) *FirestoreManifestsQuery

type FirestoreRepositoriesCollectionRef

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

FirestoreRepositoriesCollectionRef holds a reference to the Firestore collection `repositories`.

func (*FirestoreRepositoriesCollectionRef) Doc

func (*FirestoreRepositoriesCollectionRef) Limit

func (*FirestoreRepositoriesCollectionRef) OrderBy

func (*FirestoreRepositoriesCollectionRef) Where

func (ref *FirestoreRepositoriesCollectionRef) Where(path, op string, value interface{}) *FirestoreRepositoriesQuery

type FirestoreRepositoriesDocumentRef

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

FirestoreRepositoriesDocumentRef holds a reference to a Firestore document in collection `repositories`.

func (*FirestoreRepositoriesDocumentRef) Manifests

type FirestoreRepositoriesIterator

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

func (*FirestoreRepositoriesIterator) Stop

type FirestoreRepositoriesQuery

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

func (*FirestoreRepositoriesQuery) Documents

func (*FirestoreRepositoriesQuery) Limit

func (*FirestoreRepositoriesQuery) OrderBy

func (*FirestoreRepositoriesQuery) Value

func (*FirestoreRepositoriesQuery) Where

func (q *FirestoreRepositoriesQuery) Where(path, op string, value interface{}) *FirestoreRepositoriesQuery

type FirestoreSessionsCollectionRef

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

FirestoreSessionsCollectionRef holds a reference to the Firestore collection `sessions`.

func (*FirestoreSessionsCollectionRef) Doc

func (*FirestoreSessionsCollectionRef) Limit

func (*FirestoreSessionsCollectionRef) OrderBy

func (*FirestoreSessionsCollectionRef) Where

func (ref *FirestoreSessionsCollectionRef) Where(path, op string, value interface{}) *FirestoreSessionsQuery

type FirestoreSessionsDocumentRef

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

FirestoreSessionsDocumentRef holds a reference to a Firestore document in collection `sessions`.

func (*FirestoreSessionsDocumentRef) Delete

func (*FirestoreSessionsDocumentRef) Get

func (*FirestoreSessionsDocumentRef) Ref

func (*FirestoreSessionsDocumentRef) Set

type FirestoreSessionsIterator

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

func (*FirestoreSessionsIterator) GetAll

func (i *FirestoreSessionsIterator) GetAll() ([]*Session, error)

func (*FirestoreSessionsIterator) GetAllAsSnapshots

func (i *FirestoreSessionsIterator) GetAllAsSnapshots() ([]*firestore.DocumentSnapshot, error)

func (*FirestoreSessionsIterator) Next

func (i *FirestoreSessionsIterator) Next() (*Session, error)

func (*FirestoreSessionsIterator) NextAsSnapshot

func (*FirestoreSessionsIterator) Stop

func (i *FirestoreSessionsIterator) Stop()

type FirestoreSessionsQuery

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

func (*FirestoreSessionsQuery) Documents

func (*FirestoreSessionsQuery) First

func (*FirestoreSessionsQuery) Limit

func (*FirestoreSessionsQuery) OrderBy

func (*FirestoreSessionsQuery) Value

func (*FirestoreSessionsQuery) Where

func (q *FirestoreSessionsQuery) Where(path, op string, value interface{}) *FirestoreSessionsQuery

type FirestoreUsersCollectionRef

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

FirestoreUsersCollectionRef holds a reference to the Firestore collection `users`.

func (*FirestoreUsersCollectionRef) Doc

func (*FirestoreUsersCollectionRef) Limit

func (*FirestoreUsersCollectionRef) OrderBy

func (*FirestoreUsersCollectionRef) Where

func (ref *FirestoreUsersCollectionRef) Where(path, op string, value interface{}) *FirestoreUsersQuery

type FirestoreUsersDocumentRef

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

FirestoreUsersDocumentRef holds a reference to a Firestore document in collection `users`.

func (*FirestoreUsersDocumentRef) Delete

func (*FirestoreUsersDocumentRef) Get

func (*FirestoreUsersDocumentRef) Ref

func (*FirestoreUsersDocumentRef) Sessions

func (*FirestoreUsersDocumentRef) Set

func (ref *FirestoreUsersDocumentRef) Set(ctx context.Context, msg *User, opts ...firestore.SetOption) error

type FirestoreUsersIterator

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

func (*FirestoreUsersIterator) GetAll

func (i *FirestoreUsersIterator) GetAll() ([]*User, error)

func (*FirestoreUsersIterator) GetAllAsSnapshots

func (i *FirestoreUsersIterator) GetAllAsSnapshots() ([]*firestore.DocumentSnapshot, error)

func (*FirestoreUsersIterator) Next

func (i *FirestoreUsersIterator) Next() (*User, error)

func (*FirestoreUsersIterator) NextAsSnapshot

func (i *FirestoreUsersIterator) NextAsSnapshot() (*firestore.DocumentSnapshot, error)

func (*FirestoreUsersIterator) Stop

func (i *FirestoreUsersIterator) Stop()

type FirestoreUsersQuery

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

func (*FirestoreUsersQuery) Documents

func (*FirestoreUsersQuery) First

func (q *FirestoreUsersQuery) First(ctx context.Context) (*User, error)

func (*FirestoreUsersQuery) Limit

func (*FirestoreUsersQuery) OrderBy

func (*FirestoreUsersQuery) Value

func (q *FirestoreUsersQuery) Value() firestore.Query

func (*FirestoreUsersQuery) Where

func (q *FirestoreUsersQuery) Where(path, op string, value interface{}) *FirestoreUsersQuery

type Manifest

type Manifest struct {
	Id         string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Owner      string                 `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	Repository string                 `protobuf:"bytes,3,opt,name=repository,proto3" json:"repository,omitempty"`
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// contains filtered or unexported fields
}

func FirestoreMapToManifest

func FirestoreMapToManifest(m map[string]any) (*Manifest, error)

func (*Manifest) Descriptor deprecated

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

Deprecated: Use Manifest.ProtoReflect.Descriptor instead.

func (*Manifest) GetCreateTime

func (x *Manifest) GetCreateTime() *timestamppb.Timestamp

func (*Manifest) GetId

func (x *Manifest) GetId() string

func (*Manifest) GetOwner

func (x *Manifest) GetOwner() string

func (*Manifest) GetRepository

func (x *Manifest) GetRepository() string

func (*Manifest) ProtoMessage

func (*Manifest) ProtoMessage()

func (*Manifest) ProtoReflect

func (x *Manifest) ProtoReflect() protoreflect.Message

func (*Manifest) Reset

func (x *Manifest) Reset()

func (*Manifest) String

func (x *Manifest) String() string

func (*Manifest) ToFirestoreMap

func (x *Manifest) ToFirestoreMap() (map[string]any, error)

type Session

type Session struct {
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// contains filtered or unexported fields
}

func FirestoreMapToSession

func FirestoreMapToSession(m map[string]any) (*Session, error)

func (*Session) Descriptor deprecated

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

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetUuid

func (x *Session) GetUuid() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

func (x *Session) ProtoReflect() protoreflect.Message

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

func (*Session) ToFirestoreMap

func (x *Session) ToFirestoreMap() (map[string]any, error)

type User

type User struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func FirestoreMapToUser

func FirestoreMapToUser(m map[string]any) (*User, error)

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetName

func (x *User) GetName() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

func (*User) ToFirestoreMap

func (x *User) ToFirestoreMap() (map[string]any, error)

Jump to

Keyboard shortcuts

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