mbfa

package
v0.11.11 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFixedAsset

func CreateFixedAsset(tangentID string, code string, name string, ownerName string,
	propertyItems []PropertyItemRequest, pics []string) error

func CreateFixedAssetExcel

func CreateFixedAssetExcel(tangentID string, excel *multipart.FileHeader) error

func CreateFixedAssetTemplate

func CreateFixedAssetTemplate(tangentID string, name string, propertyItemNames []string) error

func DeleteFixedAsset

func DeleteFixedAsset(tangentID string, assetID string) error

func DeleteFixedAssetTemplate

func DeleteFixedAssetTemplate(tangentID string, id string) error

func Destroy

func Destroy()

func DumpFixedAssetQRCodes

func DumpFixedAssetQRCodes(appId, appSecret, tangentID, ids string) ([]byte, error)

func GenerateFixedAssetQrCode

func GenerateFixedAssetQrCode(appId, appSecret, tangentID, id string) (string, error)

func GetFixedAssetTemplateExcel

func GetFixedAssetTemplateExcel(tangentID string, id string) ([]byte, error)

func Init

func Init(baseUrl string, timeoutSec time.Duration)

func UpdateFixedAsset

func UpdateFixedAsset(tangentID string, id string, ownerName string,
	code string, name string, propertyItems []PropertyItemRequest, pics []string) error

func UpdateFixedAssetTemplate

func UpdateFixedAssetTemplate(tangentID string, id string, name string, propertyItemNames []string) error

func UploadFixedAssetPic

func UploadFixedAssetPic(pic *multipart.FileHeader) (string, string, error)

Types

type FixedAssetInfo

type FixedAssetInfo struct {
	ID                string             `json:"id" binding:"required"`
	Code              string             `json:"code" binding:"required"`
	Name              string             `json:"name" binding:"required"`
	OwnerName         string             `json:"ownerName" binding:"required"`
	TemplateID        string             `json:"templateId" binding:"required"`
	Pics              []PicInfo          `json:"pics"`
	PropertyItemInfos []PropertyItemInfo `json:"propertyItemInfos"`
}

func GetFixedAssets

func GetFixedAssets(tangentID string, id string, code string, name string,
	ownerName string, pageNo int, pageSize int) ([]FixedAssetInfo, int64, error)

type FixedAssetTemplateInfo

type FixedAssetTemplateInfo struct {
	ID                string   `json:"id" binding:"required"`
	Name              string   `json:"name" binding:"required"`
	PropertyItemNames []string `json:"propertyItemNames" binding:"required"`
}

func GetFixedAssetTemplates

func GetFixedAssetTemplates(tangentID string, id string, name string,
	pageNo int, pageSize int) ([]FixedAssetTemplateInfo, int64, error)

type PicInfo

type PicInfo struct {
	ObjName string `json:"objName"`
	Url     string `json:"url"`
}

type PropertyItemInfo

type PropertyItemInfo struct {
	ID    string `json:"id" binding:"required"`
	Name  string `json:"name" binding:"required"`
	Value string `json:"value" binding:"required"`
}

type PropertyItemRequest

type PropertyItemRequest struct {
	Name  string `json:"name" binding:"required"`
	Value string `json:"value" binding:"required"`
}

Jump to

Keyboard shortcuts

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