storage

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

func New

func New(dsn string) (db Database, err error)

func (Database) GetImportTimestamp

func (db Database) GetImportTimestamp(source string, target string, entity models.Entity) (time.Time, error)

func (Database) GetOAuth2Token

func (db Database) GetOAuth2Token(service string) (*oauth2.Token, error)

func (Database) SetImportTimestamp

func (db Database) SetImportTimestamp(source string, target string, entity models.Entity, timestamp time.Time) error

func (Database) SetOAuth2Token

func (db Database) SetOAuth2Token(service string, token *oauth2.Token) error

type ImportTimestamp

type ImportTimestamp struct {
	SourceService string        `gorm:"primaryKey"`
	TargetService string        `gorm:"primaryKey"`
	Entity        models.Entity `gorm:"primaryKey"`
	CreatedAt     time.Time
	UpdatedAt     time.Time
	Timestamp     time.Time `gorm:"default:'1970-01-01T00:00:00'"`
}

type OAuth2Token

type OAuth2Token struct {
	Service   string         `gorm:"primaryKey"`
	Token     datatypes.JSON `gorm:"type:json"`
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (OAuth2Token) TableName

func (OAuth2Token) TableName() string

Jump to

Keyboard shortcuts

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