model

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthTitans = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTitans   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type App

type App struct {
	ID     int64      `json:"id" gorm:"primary_key"`
	Name   string     `json:"name"`
	TreeID int64      `json:"tree_id"`
	Env    string     `json:"env"`
	Zone   string     `json:"zone"`
	Token  string     `json:"token"`
	Status int8       `json:"status"`
	Ctime  xtime.Time `json:"ctime"`
	Mtime  xtime.Time `json:"mtime"`
}

App app.

func (App) TableName

func (App) TableName() string

TableName app

type AppListReq

type AppListReq struct {
	AppName string `form:"app_name"`
	Bu      string `form:"bu"`
	Team    string `form:"team"`
	Pn      int64  `form:"pn" default:"1" validate:"min=1"`
	Ps      int64  `form:"ps" default:"20" validate:"min=1"`
	Status  int8   `form:"status"`
}

AppListReq ...

type AppPager

type AppPager struct {
	Total int64  `json:"total"`
	Pn    int64  `json:"pn"`
	Ps    int64  `json:"ps"`
	Items []*App `json:"items"`
}

AppPager app pager

type AppStatusReq

type AppStatusReq struct {
	TreeID int64 `form:"tree_id" validate:"required"`
	Status int8  `form:"status" default:"1"`
}

AppStatusReq ...

type CacheData

type CacheData struct {
	Data  map[int64]*RoleNode `json:"data"`
	CTime time.Time           `json:"ctime"`
}

CacheData ...

type CasterEnvsReq

type CasterEnvsReq struct {
	TreeID int64  `form:"tree_id" validate:"required"`
	Zone   string `form:"zone" validate:"required"`
	Auth   string `form:"auth" validate:"required"`
}

CasterEnvsReq ...

type Confkv

type Confkv struct {
	ID    int64     `json:"id" gorm:"column:id"`
	Key   string    `json:"key" form:"key"`
	Value string    `json:"value" form:"value"`
	Ctime time.Time `json:"ctime"`
	Mtime time.Time `json:"mtime"`
}

Confkv def

func (Confkv) TableName

func (c Confkv) TableName() string

TableName resource

type CreateReq

type CreateReq struct {
	AppName string `form:"app_name" validate:"required"`
	TreeID  int64  `form:"tree_id" validate:"required"`
}

CreateReq ...

type Env

type Env struct {
	Name     string `json:"name"`
	NikeName string `json:"nike_name"`
	Token    string `json:"token"`
}

Env env.

type EnvsByTeamReq

type EnvsByTeamReq struct {
	AppName string `form:"app_name"`
	Zone    string `form:"zone"`
	Team    string `form:"team"`
}

EnvsByTeamReq ...

type EnvsReq

type EnvsReq struct {
	AppName string `form:"app_name" validate:"required"`
	TreeID  int64  `form:"tree_id" validate:"required"`
	Zone    string `form:"zone" validate:"required"`
}

EnvsReq ...

type InsertMaps

type InsertMaps struct {
	Team    int64  `protobuf:"varint,2,opt,name=team,proto3" json:"team"`
	Keyword string `protobuf:"bytes,3,opt,name=keyword,proto3" json:"keyword"`
	Name    string `protobuf:"bytes,4,opt,name=name,proto3" json:"name"`
	Value   string `protobuf:"bytes,5,opt,name=value,proto3" json:"value"`
	Status  int64  `protobuf:"bytes,5,opt,name=value,proto3" json:"status"`
}

InsertMaps is used to insertDb format

func (*InsertMaps) TableName

func (cf *InsertMaps) TableName() string

TableName is used to identify table name in gorm

type InsertServiceConfig

type InsertServiceConfig struct {
	TreeName string `protobuf:"bytes,3,opt,name=tree_name,proto3" json:"tree_name"`
	TreePath string `protobuf:"bytes,3,opt,name=tree_path,proto3" json:"tree_path"`
	TreeId   int64  `protobuf:"bytes,3,opt,name=tree_id,proto3" json:"tree_id"`
	Service  string `protobuf:"bytes,2,opt,name=service,json=servuce,proto3" `
	Keyword  string `protobuf:"bytes,3,opt,name=template,proto3" json:"keyword"`
	Template int64  `protobuf:"bytes,3,opt,name=template,proto3" json:"template"`
	Value    string `protobuf:"bytes,4,opt,name=value,proto3" json:"value"`
	Name     string `protobuf:"bytes,5,opt,name=name,proto3" json:"name"`
	Status   int64  `protobuf:"varint,6,opt,name=status,proto3" json:"status"`
}

InsertServiceConfig is used to insertDb format

func (*InsertServiceConfig) TableName

func (cf *InsertServiceConfig) TableName() string

TableName is used to identify table name in gorm

type Node

type Node struct {
	Name   string `json:"name"`
	Path   string `json:"path"`
	TreeID int64  `json:"tree_id"`
}

Node node.

type NodeTreeReq

type NodeTreeReq struct {
	Node string `form:"node"`
	Team string `form:"team"`
}

NodeTreeReq ...

type Res

type Res struct {
	Count   int         `json:"count"`
	Data    []*TreeNode `json:"data"`
	Page    int         `json:"page"`
	Results int         `json:"results"`
}

Res res.

type Resource

type Resource struct {
	ID        int64     `json:"id" gorm:"column:id"`
	Platform  string    `json:"platform" form:"platform"`
	Build     int64     `json:"build" form:"build"`
	LimitType int64     `json:"limit" form:"limit_type"`
	StartTime time.Time `json:"start_time" form:"start_time"`
	EndTime   time.Time `json:"end_time" form:"end_time"`
	Type      string    `json:"type" form:"type"`
	Title     string    `json:"title" form:"title"`
	ImageInfo string    `json:"image_info" form:"image_info"`
	Ctime     time.Time `json:"ctime"`
	Mtime     time.Time `json:"mtime"`
}

Resource def

func (Resource) TableName

func (c Resource) TableName() string

TableName resource

type Resp

type Resp struct {
	Data map[string]*Tree `json:"data"`
}

Resp tree resp

type RoleNode

type RoleNode struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
	Path string `json:"path"`
	Type int8   `json:"type"`
	Role int8   `json:"role"`
}

RoleNode roleNode .

type ServiceConfigObject

type ServiceConfigObject struct {
	Id       int64     `json:"id" gorm:"comumn:id"`
	TreeName string    `protobuf:"bytes,2,opt,name=tree_name,proto3" json:"tree_name"`
	TreePath string    `protobuf:"bytes,3,opt,name=tree_path,proto3" json:"tree_path"`
	TreeId   int64     `protobuf:"varint,4,opt,name=tree_id,proto3" json:"tree_id"`
	Service  string    `protobuf:"bytes,5,opt,name=service,proto3" json:"service"`
	Keyword  string    `protobuf:"bytes,6,opt,name=keyword,proto3" json:"keyword"`
	Template int64     `protobuf:"varint,7,opt,name=template,proto3" json:"template"`
	Value    string    `protobuf:"bytes,8,opt,name=value,proto3" json:"value"`
	Name     string    `protobuf:"bytes,9,opt,name=name,proto3" json:"name"`
	Status   int64     `protobuf:"varint,10,opt,name=status,proto3" json:"status"`
	Ctime    time.Time `protobuf:"bytes,7,opt,name=ctime,proto3" json:"ctime"`
	Mtime    time.Time `protobuf:"bytes,8,opt,name=mtime,proto3" json:"mtime"`
}

ServiceConfigObject is used to format select

func (*ServiceConfigObject) TableName

func (cf *ServiceConfigObject) TableName() string

TableName is used to identify table name in gorm

type ServiceModel

type ServiceModel struct {
	Id                   int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
	TreeName             string   `protobuf:"bytes,2,opt,name=tree_name,json=treeName,proto3" json:"tree_name"`
	TreePath             string   `protobuf:"bytes,3,opt,name=tree_path,json=treePath,proto3" json:"tree_path"`
	TreeId               int64    `protobuf:"varint,4,opt,name=tree_id,json=treeId,proto3" json:"tree_id"`
	Service              string   `protobuf:"bytes,5,opt,name=service,proto3" json:"service"`
	Keyword              string   `protobuf:"bytes,6,opt,name=keyword,proto3" json:"keyword"`
	Template             int64    `protobuf:"varint,7,opt,name=template,proto3" json:"template"`
	Value                string   `protobuf:"bytes,8,opt,name=value,proto3" json:"value"`
	Name                 string   `protobuf:"bytes,9,opt,name=name,proto3" json:"name"`
	Status               int64    `protobuf:"varint,10,opt,name=status,proto3" json:"status"`
	Ctime                string   `protobuf:"bytes,11,opt,name=ctime,proto3" json:"ctime"`
	Mtime                string   `protobuf:"bytes,12,opt,name=mtime,proto3" json:"mtime"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServiceModel) Descriptor

func (*ServiceModel) Descriptor() ([]byte, []int)

func (*ServiceModel) GetCtime

func (m *ServiceModel) GetCtime() string

func (*ServiceModel) GetId

func (m *ServiceModel) GetId() int64

func (*ServiceModel) GetKeyword

func (m *ServiceModel) GetKeyword() string

func (*ServiceModel) GetMtime

func (m *ServiceModel) GetMtime() string

func (*ServiceModel) GetName

func (m *ServiceModel) GetName() string

func (*ServiceModel) GetService

func (m *ServiceModel) GetService() string

func (*ServiceModel) GetStatus

func (m *ServiceModel) GetStatus() int64

func (*ServiceModel) GetTemplate

func (m *ServiceModel) GetTemplate() int64

func (*ServiceModel) GetTreeId

func (m *ServiceModel) GetTreeId() int64

func (*ServiceModel) GetTreeName

func (m *ServiceModel) GetTreeName() string

func (*ServiceModel) GetTreePath

func (m *ServiceModel) GetTreePath() string

func (*ServiceModel) GetValue

func (m *ServiceModel) GetValue() string

func (*ServiceModel) Marshal

func (m *ServiceModel) Marshal() (dAtA []byte, err error)

func (*ServiceModel) MarshalTo

func (m *ServiceModel) MarshalTo(dAtA []byte) (int, error)

func (*ServiceModel) ProtoMessage

func (*ServiceModel) ProtoMessage()

func (*ServiceModel) Reset

func (m *ServiceModel) Reset()

func (*ServiceModel) Size

func (m *ServiceModel) Size() (n int)

func (*ServiceModel) String

func (m *ServiceModel) String() string

func (*ServiceModel) Unmarshal

func (m *ServiceModel) Unmarshal(dAtA []byte) error

func (*ServiceModel) XXX_DiscardUnknown

func (m *ServiceModel) XXX_DiscardUnknown()

func (*ServiceModel) XXX_Marshal

func (m *ServiceModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceModel) XXX_Merge

func (dst *ServiceModel) XXX_Merge(src proto.Message)

func (*ServiceModel) XXX_Size

func (m *ServiceModel) XXX_Size() int

func (*ServiceModel) XXX_Unmarshal

func (m *ServiceModel) XXX_Unmarshal(b []byte) error

type SundryConfig

type SundryConfig struct {
	Id                   int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
	Team                 int64    `protobuf:"varint,2,opt,name=team,proto3" json:"team"`
	Keyword              string   `protobuf:"bytes,3,opt,name=keyword,proto3" json:"keyword"`
	Value                string   `protobuf:"bytes,4,opt,name=value,proto3" json:"value"`
	Name                 string   `protobuf:"bytes,5,opt,name=name,proto3" json:"name"`
	Status               int64    `protobuf:"varint,6,opt,name=status,proto3" json:"status"`
	Ctime                string   `protobuf:"bytes,7,opt,name=ctime,proto3" json:"ctime"`
	Mtime                string   `protobuf:"bytes,8,opt,name=mtime,proto3" json:"mtime"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SundryConfig) Descriptor

func (*SundryConfig) Descriptor() ([]byte, []int)

func (*SundryConfig) GetCtime

func (m *SundryConfig) GetCtime() string

func (*SundryConfig) GetId

func (m *SundryConfig) GetId() int64

func (*SundryConfig) GetKeyword

func (m *SundryConfig) GetKeyword() string

func (*SundryConfig) GetMtime

func (m *SundryConfig) GetMtime() string

func (*SundryConfig) GetName

func (m *SundryConfig) GetName() string

func (*SundryConfig) GetStatus

func (m *SundryConfig) GetStatus() int64

func (*SundryConfig) GetTeam

func (m *SundryConfig) GetTeam() int64

func (*SundryConfig) GetValue

func (m *SundryConfig) GetValue() string

func (*SundryConfig) Marshal

func (m *SundryConfig) Marshal() (dAtA []byte, err error)

func (*SundryConfig) MarshalTo

func (m *SundryConfig) MarshalTo(dAtA []byte) (int, error)

func (*SundryConfig) ProtoMessage

func (*SundryConfig) ProtoMessage()

func (*SundryConfig) Reset

func (m *SundryConfig) Reset()

func (*SundryConfig) Size

func (m *SundryConfig) Size() (n int)

func (*SundryConfig) String

func (m *SundryConfig) String() string

func (*SundryConfig) TableName

func (cf *SundryConfig) TableName() string

TableName is used to identify table name in gorm

func (*SundryConfig) Unmarshal

func (m *SundryConfig) Unmarshal(dAtA []byte) error

func (*SundryConfig) XXX_DiscardUnknown

func (m *SundryConfig) XXX_DiscardUnknown()

func (*SundryConfig) XXX_Marshal

func (m *SundryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SundryConfig) XXX_Merge

func (dst *SundryConfig) XXX_Merge(src proto.Message)

func (*SundryConfig) XXX_Size

func (m *SundryConfig) XXX_Size() int

func (*SundryConfig) XXX_Unmarshal

func (m *SundryConfig) XXX_Unmarshal(b []byte) error

type SundyConfigObject

type SundyConfigObject struct {
	Id      int64     `json:"id" gorm:"comumn:id"`
	Team    int64     `json:"team" gorm:"comumn:team"`
	Keyword string    `json:"index" gorm:"comumn:keyword"`
	Name    string    `json:"name" gorm:"comumn:name"`
	Value   string    `json:"value" gorm:"comumn:value"`
	Ctime   time.Time `json:"ctime" gorm:"comumn:ctime"`
	Mtime   time.Time `json:"mtime" gorm:"comumn:mtime"`
	Status  int64     `json:"status" gorm:"comumn:status"`
}

SundyConfigObject is used to format select

func (*SundyConfigObject) TableName

func (cf *SundyConfigObject) TableName() string

TableName is used to identify table name in gorm

type Tree

type Tree struct {
	Name     string           `json:"name"`
	Type     int              `json:"type"`
	Path     string           `json:"path"`
	Tags     *TreeTag         `json:"tags"`
	Children map[string]*Tree `json:"children"`
}

Tree node.

type TreeNode

type TreeNode struct {
	Alias     string      `json:"alias"`
	CreatedAt string      `json:"created_at"`
	Name      string      `json:"name"`
	Path      string      `json:"path"`
	Tags      interface{} `json:"tags"`
	Type      int         `json:"type"`
}

TreeNode TreeNode.

type TreeTag

type TreeTag struct {
	Ops string `json:"ops"`
	Rds string `json:"rds"`
}

TreeTag tree tag.

type UpdateServiceConfig

type UpdateServiceConfig struct {
	Service  string `protobuf:"bytes,3,opt,name=service,proto3" json:"service"`
	Keyword  string `protobuf:"bytes,3,opt,name=template,proto3" json:"keyword"`
	Template int64  `protobuf:"bytes,3,opt,name=template,proto3" json:"template"`
	Value    string `protobuf:"bytes,4,opt,name=value,proto3" json:"value"`
	Name     string `protobuf:"bytes,5,opt,name=name,proto3" json:"name"`
	Status   int64  `protobuf:"varint,6,opt,name=status,proto3" json:"status"`
}

UpdateServiceConfig is used to insertDb format

func (*UpdateServiceConfig) TableName

func (cf *UpdateServiceConfig) TableName() string

TableName is used to identify table name in gorm

type UpdateTokenReq

type UpdateTokenReq struct {
	AppName string `form:"app_name" validate:"required"`
	Env     string `form:"env" validate:"required"`
	Zone    string `form:"zone" validate:"required"`
	TreeID  int64  `form:"tree_id" validate:"required"`
}

UpdateTokenReq ...

type UserResource

type UserResource struct {
	ID       int32     `json:"id" gorm:"id"`
	ResType  int32     `json:"res_type" form:"res_type"`
	CustomID int32     `json:"custom_id" form:"custom_id"`
	Title    string    `json:"title" form:"title"`
	URL      string    `json:"url" form:"url"`
	Weight   int32     `json:"weight" form:"weight"`
	Status   int32     `json:"status" form:"status"`
	Creator  string    `json:"creator" form:"creator"`
	Ctime    time.Time `json:"ctime"`
	Mtime    time.Time `json:"mtime"`
}

UserResource def

func (UserResource) TableName

func (c UserResource) TableName() string

TableName user_resource

type ZoneCopyReq

type ZoneCopyReq struct {
	AppName string `form:"app_name" validate:"required"`
	From    string `form:"from_zone" validate:"required"`
	To      string `form:"to_zone" validate:"required"`
	TreeID  int64  `form:"tree_id" validate:"required"`
}

ZoneCopyReq ...

Jump to

Keyboard shortcuts

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