platform

package
v0.0.0-...-ea7d51e Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAppIdNotFound = errors.New("appid not found")
	ErrAppDisabled   = errors.New("appid is disable")
)

Functions

This section is empty.

Types

type Service

type Service interface {

	// DetailByAppID get session account by app id
	DetailByAppID(ctx context.Context, appid string) (model.SessionKey, error)
	// Secret give appid return secret
	Secret(ctx context.Context, appid httpsign.KeyID) (*httpsign.Secret, error)
	// SessionsKeysPaginate open api account paginate
	SessionsKeysPaginate(ctx context.Context, req SessionKeysPaginateReq) (*SessionKeyRsp, error)
	// SaveSessionKeys save open api account
	SaveSessionKeys(ctx context.Context, data *SessionKeysReq) (err error)
	// SetStatusSessionKeys set enable/disable by session no
	SetStatusSessionKeys(ctx context.Context, status uint32, sessionNos ...string) (int64, error)
	// contains filtered or unexported methods
}

func New

func New(repo orm.Repo, logger *zap.Logger) Service

type SessionKeyDetail

type SessionKeyDetail struct {
	SessionNo string    `json:"session_no"`
	Name      string    `json:"name"`
	Type      uint32    `json:"type"`
	AppID     string    `json:"app_id"`
	IsEnabled uint32    `json:"is_enabled"`
	Remark    string    `json:"remark"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type SessionKeyRsp

type SessionKeyRsp struct {
	common.PaginateRsp
}

type SessionKeysPaginateReq

type SessionKeysPaginateReq struct {
	common.PaginateReq

	ID        int64
	SessionNo string
	Name      string
	Type      uint32
	AppID     string
	IsEnabled uint32
	StartTime *time.Time
	EndTime   *time.Time
}

type SessionKeysReq

type SessionKeysReq struct {
	SessionNo string
	Name      string
	Type      uint32
	IsEnabled uint32
	Remark    string
}

Jump to

Keyboard shortcuts

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