store

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LOG = logrus.New()

Functions

This section is empty.

Types

type Store

type Store struct {
	Database *gorm.DB
}

func New

func New(dbType string, databaseUrl string) (*Store, error)

func (*Store) Get

func (s *Store) Get(clientKey string) (*Tenant, error)

func (*Store) Set

func (s *Store) Set(tenant *Tenant) (*Tenant, error)

type Tenant

type Tenant struct {
	ClientKey      string `json:"clientKey" gorm:"type:varchar(255);primary_key"`
	PublicKey      string `json:"publicKey" gorm:"type:varchar(512)"`
	SharedSecret   string `json:"sharedSecret" gorm:"type:varchar(255);NOT NULL"`
	OauthClientId  string `json:"oauthClientId" gorm:"type:varchar(255)"`
	BaseURL        string `json:"baseUrl" gorm:"type:varchar(255);NOT NULL"`
	ProductType    string `json:"productType" gorm:"type:varchar(255)"`
	Description    string `json:"description" gorm:"type:varchar(255)"`
	AddonInstalled bool   `json:"-" gorm:"type:bool;NOT NULL"`
	CreatedAt      time.Time
	UpdatedAt      time.Time
	EventType      string `json:"eventType" gorm:"-"`
}

func NewTenantFromReader

func NewTenantFromReader(r io.Reader) (*Tenant, error)

Jump to

Keyboard shortcuts

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