Documentation
¶
Index ¶
Constants ¶
View Source
const ( TunOutType = "tun_out" TunInType = "tun_in" )
Variables ¶
View Source
var ErrServerNotExist = errors.New("server not exist")
Functions ¶
This section is empty.
Types ¶
type Func ¶
type Func struct {
Rule RuleFunc
Server ServerFunc
}
type Rule ¶
type Rule struct {
Id int64 `xorm:"pk autoincr" json:"id"`
Name string `xorm:"varchar(255) notnull unique" json:"name"`
ListenAddr string `xorm:"varchar(255) notnull" json:"listen_addr"`
TargetType string `xorm:"varchar(255)" json:"target_type"`
TargetAddr []string `xorm:"json" json:"target_addr"`
TargetRule int64 `xorm:"index" json:"target_rule"`
TargetTag string `xorm:"varchar(255)" json:"target_tag"`
Config string `json:"config"`
ServerId int64 `xorm:"index notnull" json:"server_id"`
CreatedAt time.Time `xorm:"created" json:"created_at"`
UpdatedAt time.Time `xorm:"updated" json:"updated_at"`
}
type ServerFunc ¶
type ServerFunc struct {
// contains filtered or unexported fields
}
func (*ServerFunc) Create ¶
func (s *ServerFunc) Create(nd *Server) error
func (*ServerFunc) Delete ¶
func (s *ServerFunc) Delete(nd *Server) error
func (*ServerFunc) Get ¶
func (s *ServerFunc) Get(nd *Server) error
func (*ServerFunc) List ¶
func (s *ServerFunc) List() ([]Server, error)
func (*ServerFunc) Update ¶
func (s *ServerFunc) Update(nd *Server) error
Click to show internal directories.
Click to hide internal directories.