Documentation ¶
Index ¶
- Constants
- func GetBestCorridorFlag(key CorridorKey) int
- func GetBestCorridorStatus(key CorridorKey) bool
- func RefreshCorridorCache(db *sqlx.DB) error
- func RefreshCorridorCacheByType(db *sqlx.DB, corridorType CorridorType) error
- func RefreshCorridorCacheByTypeId(db *sqlx.DB, corridorTypeId int) error
- func RegisterCorridorRoutes(r *gin.RouterGroup, db *sqlx.DB)
- func RemoveCorridor(db *sqlx.DB, corridorId int) (int64, error)
- type Corridor
- type CorridorKey
- type CorridorPriority
- type CorridorType
Constants ¶
View Source
const ( FromTag = CorridorPriority(iota) FromNode ToTag ToNode Channel )
Variables ¶
This section is empty.
Functions ¶
func GetBestCorridorFlag ¶
func GetBestCorridorFlag(key CorridorKey) int
func GetBestCorridorStatus ¶
func GetBestCorridorStatus(key CorridorKey) bool
func RefreshCorridorCache ¶
func RefreshCorridorCacheByType ¶
func RefreshCorridorCacheByType(db *sqlx.DB, corridorType CorridorType) error
func RegisterCorridorRoutes ¶
func RegisterCorridorRoutes(r *gin.RouterGroup, db *sqlx.DB)
Types ¶
type Corridor ¶
type Corridor struct { CorridorId int `json:"corridorId" db:"corridor_id"` CorridorTypeId int `json:"corridorTypeId" db:"corridor_type_id"` ReferenceId *int `json:"referenceId" db:"reference_id"` Flag int `json:"flag" db:"flag"` Inverse bool `json:"inverse" db:"inverse"` Priority int `json:"priority" db:"priority"` FromTagId *int `json:"fromTagId" db:"from_tag_id"` FromNodeId *int `json:"fromNodeId" db:"from_node_id"` ChannelId *int `json:"channelId" db:"channel_id"` ToTagId *int `json:"toTagId" db:"to_tag_id"` ToNodeId *int `json:"toNodeId" db:"to_node_id"` CreatedOn time.Time `json:"createdOn" db:"created_on"` UpdateOn time.Time `json:"updatedOn" db:"updated_on"` }
func AddCorridor ¶
AddCorridor doesn't refresh the cache!!!
func GetBestCorridor ¶
func GetBestCorridor(key CorridorKey) Corridor
type CorridorKey ¶
type CorridorKey struct { CorridorType CorridorType `json:"corridorType"` Inverse bool `json:"inverse"` ReferenceId int `json:"referenceId"` FromTagId int `json:"fromTagId"` FromNodeId int `json:"fromNodeId"` ChannelId int `json:"channelId"` ToTagId int `json:"toTagId"` ToNodeId int `json:"toNodeId"` }
type CorridorPriority ¶
type CorridorPriority int
Click to show internal directories.
Click to hide internal directories.