Documentation
¶
Index ¶
- Variables
- func DedupeStringArr(arr []string) []string
- func GetBaseFilePath() string
- func GetMillis() int64
- func GetMillisForTime(thisTime time.Time) int64
- func GetTimeForMillis(millis int64) time.Time
- func Intersection(x ...[]interface{}) []interface{}
- func IsCloudLicense(license *mmModel.License) bool
- func IsRunningUnitTests() bool
- func MakeBoardLink(serverRoot string, teamID string, board string) string
- func MakeCardLink(serverRoot string, teamID string, boardID string, cardID string) string
- func NewID(idType IDType) string
- func SecondsToMillis(seconds int64) int64
- func StructToMap(v interface{}) (m map[string]interface{})
- type CallbackFunc
- type CallbackQueue
- type IDType
Constants ¶
This section is empty.
Variables ¶
var Anything = mock.MatchedBy(func(interface{}) bool { return true })
Functions ¶
func DedupeStringArr ¶
func GetBaseFilePath ¶
func GetBaseFilePath() string
func GetMillis ¶
func GetMillis() int64
GetMillis is a convenience method to get milliseconds since epoch.
func GetMillisForTime ¶
GetMillisForTime is a convenience method to get milliseconds since epoch for provided Time.
func GetTimeForMillis ¶
GetTimeForMillis is a convenience method to get time.Time for milliseconds since epoch.
func Intersection ¶
func Intersection(x ...[]interface{}) []interface{}
func IsCloudLicense ¶
func IsRunningUnitTests ¶
func IsRunningUnitTests() bool
IsRunningUnitTests returns true if this instance of FocalBoard is running unit or integration tests.
func MakeCardLink ¶
MakeCardLink creates fully qualified card links based on card id and parents.
func NewID ¶
NewId is a globally unique identifier. It is a [A-Z0-9] string 27 characters long. It is a UUID version 4 Guid that is zbased32 encoded with the padding stripped off, and a one character alpha prefix indicating the type of entity or a `7` if unknown type.
func SecondsToMillis ¶
SecondsToMillis is a convenience method to convert seconds to milliseconds.
func StructToMap ¶
func StructToMap(v interface{}) (m map[string]interface{})
Types ¶
type CallbackFunc ¶
type CallbackFunc func() error
CallbackFunc is a func that can enqueued in the callback queue and will be called when dequeued.
type CallbackQueue ¶
type CallbackQueue struct {
// contains filtered or unexported fields
}
CallbackQueue provides a simple thread pool for processing callbacks. Callbacks will be executed in the order in which they are enqueued, but no guarantees are provided regarding the order in which they finish (unless poolSize == 1).
func NewCallbackQueue ¶
func NewCallbackQueue(name string, queueSize int, poolSize int, logger mlog.LoggerIFace) *CallbackQueue
NewCallbackQueue creates a new CallbackQueue and starts a thread pool to service it.
func (*CallbackQueue) Enqueue ¶
func (cn *CallbackQueue) Enqueue(f CallbackFunc)
Enqueue adds a callback to the queue.