dao

package
v0.0.0-...-7dcf681 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParseClient

type ParseClient struct {
	ParseClient *parse.ParseClient
}

type ParseObjectMongoDB

type ParseObjectMongoDB struct {
	ObjectID  string                 `bson:"_id"`
	ClassName string                 `bson:"className"`
	Data      map[string]interface{} `bson:"data"`
}

ParseObjectMongoDB is a concrete implementation of ParseObject interface for MongoDB database

func (*ParseObjectMongoDB) Delete

func (p *ParseObjectMongoDB) Delete(client *mongo.Client) error

Delete deletes this object from MongoDB database using the given client

func (*ParseObjectMongoDB) GetClassName

func (p *ParseObjectMongoDB) GetClassName() string

GetClassName returns the class name of this object

func (*ParseObjectMongoDB) GetData

func (p *ParseObjectMongoDB) GetData() map[string]interface{}

GetData returns the data of this object as a map

func (*ParseObjectMongoDB) GetObjectID

func (p *ParseObjectMongoDB) GetObjectID() string

GetObjectID returns the object id of this object

func (*ParseObjectMongoDB) Save

func (p *ParseObjectMongoDB) Save(client *mongo.Client) error

Save inserts or updates this object in MongoDB database using the given client

type ParseObjectRedis

type ParseObjectRedis struct {
	ObjectID  string                 `json:"objectId"`
	ClassName string                 `json:"className"`
	Data      map[string]interface{} `json:"data"`
}

func (*ParseObjectRedis) GetClassName

func (p *ParseObjectRedis) GetClassName() string

GetClassName returns the class name of this object

func (*ParseObjectRedis) GetData

func (p *ParseObjectRedis) GetData() map[string]interface{}

GetData returns the data of this object as a map

func (*ParseObjectRedis) GetObjectID

func (p *ParseObjectRedis) GetObjectID() string

GetObjectID returns the object id of this object

func (*ParseObjectRedis) Save

func (p *ParseObjectRedis) Save(client *redis.Client) error

Save inserts or updates this object in Redis database using the given client

Jump to

Keyboard shortcuts

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