ctx

package
v6.7.3 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	DB        *gorm.DB
	CenterApi conf.CenterApi
	Ctx       context.Context
	IsCenter  bool
}

func NewContext

func NewContext(ctx context.Context, db *gorm.DB, isCenter bool, centerApis ...conf.CenterApi) *Context

func (*Context) GetContext

func (c *Context) GetContext() context.Context

get context from Context

func (*Context) GetDB

func (c *Context) GetDB() *gorm.DB

get db from Context

func (*Context) SetDB

func (c *Context) SetDB(db *gorm.DB)

set db to Context

Jump to

Keyboard shortcuts

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