github.com/geniusesgroup/libgo@v0.0.0-20220713101832-828057a9d3d4/ChaparKhane/service.go (about) 1 /* For license and copyright information please see LEGAL file in repository */ 2 3 package chaparkhane 4 5 // Service store needed data for service! 6 type Service struct { 7 ID uint32 // Handy ID or Hash of name! 8 Name string 9 IssueDate int64 10 ExpiryDate int64 11 ExpireInFavorOf string // Other service name 12 ExpireInFavorOfID uint32 // Other ServiceID! Handy ID or Hash of ExpireInFavorOf! 13 Status uint8 14 Handler PacketHandler 15 Description []string 16 TAGS []string 17 } 18 19 // Service Status 20 // https://en.wikipedia.org/wiki/Software_release_life_cycle 21 const ( 22 // ServiceStatePreAlpha refers to all activities performed during the software project before formal testing. 23 ServiceStatePreAlpha uint8 = iota 24 // ServiceStateAlpha is the first phase to begin software testing 25 ServiceStateAlpha 26 // ServiceStateBeta generally begins when the software is feature complete but likely to contain a number of known or unknown bugs. 27 ServiceStateBeta 28 // ServiceStatePerpetualBeta where new features are continually added to the software without establishing a final "stable" release. 29 // This technique may allow a developer to delay offering full support and responsibility for remaining issues. 30 ServiceStatePerpetualBeta 31 // ServiceStateOpenBeta is for a larger group, or anyone interested. 32 ServiceStateOpenBeta 33 // ServiceStateClosedBeta is released to a restricted group of individuals for a user test by invitation. 34 ServiceStateClosedBeta 35 // ServiceStateReleaseCandidate also known as "going silver", is a beta version with potential to be a stable product, 36 // which is ready to release unless significant bugs emerge 37 ServiceStateReleaseCandidate 38 // ServiceStateStableRelease Also called production release, 39 // the stable release is the last release candidate (RC) which has passed all verifications / tests. 40 ServiceStateStableRelease 41 // ServiceStateEndOfLife indicate no longer supported and continue its existence until to ExpiryDate! 42 ServiceStateEndOfLife 43 ) 44 45 // PacketHandler show how to write packet handler function 46 type PacketHandler func(s *Server, conn *UserConnection)