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)
- func RemoveCorridorByReference(db *sqlx.DB, ReferenceId int) (int64, error)
- func RemoveCorridorByTag(db *sqlx.DB, tagId int) (int64, error)
- type Corridor
- func AddCorridor(db *sqlx.DB, c Corridor) (*Corridor, error)
- func GetBestCorridor(key CorridorKey) Corridor
- func GetCorridor(db *sqlx.DB, corridorId int) (Corridor, error)
- func GetCorridorsReferencingCategory(db *sqlx.DB, categoryId int) (corridors []*Corridor, err error)
- func GetCorridorsReferencingNode(db *sqlx.DB, nodeId int) (corridors []*Corridor, err error)
- func GetCorridorsReferencingTag(db *sqlx.DB, tagId int) (corridors []*Corridor, err error)
- type CorridorFields
- type CorridorKey
- type CorridorNodesChannels
- type CorridorPriority
- type CorridorType
Constants ¶
View Source
const ( FromCategory = CorridorPriority(iota) FromTag FromNode ToCategory 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)
func RemoveCorridor ¶
RemoveCorridor doesn't refresh the cache!!!
func RemoveCorridorByReference ¶ added in v0.16.0
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"` FromCategoryId *int `json:"fromCategoryId" db:"from_category_id"` FromTagId *int `json:"fromTagId" db:"from_tag_id"` FromNodeId *int `json:"fromNodeId" db:"from_node_id"` ChannelId *int `json:"channelId" db:"channel_id"` ToCategoryId *int `json:"toCategoryId" db:"to_category_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
func GetCorridorsReferencingCategory ¶ added in v0.12.0
type CorridorFields ¶ added in v0.16.0
type CorridorKey ¶
type CorridorKey struct { CorridorType CorridorType `json:"corridorType"` Inverse bool `json:"inverse"` ReferenceId int `json:"referenceId"` FromCategoryId int `json:"fromCategoryId"` FromTagId int `json:"fromTagId"` FromNodeId int `json:"fromNodeId"` ChannelId int `json:"channelId"` ToCategoryId int `json:"toCategoryId"` ToTagId int `json:"toTagId"` ToNodeId int `json:"toNodeId"` }
type CorridorNodesChannels ¶ added in v0.16.0
type CorridorNodesChannels struct { Corridors []*CorridorFields `json:"corridors"` TotalNodes int `json:"totalNodes" db:"total_nodes"` TotalChannels int `json:"totalChannels" db:"total_channels"` }
type CorridorPriority ¶
type CorridorPriority int
type CorridorType ¶
func Category ¶ added in v0.12.0
func Category() CorridorType
func Tag ¶
func Tag() CorridorType
Click to show internal directories.
Click to hide internal directories.