github.com/onosproject/onos-api/go@v0.10.32/onos/config/types.go (about)

     1  // SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
     2  //
     3  // SPDX-License-Identifier: Apache-2.0
     4  
     5  package config
     6  
     7  import "github.com/google/uuid"
     8  
     9  // ID is an identifier type
    10  type ID string
    11  
    12  // Index is the index of an object
    13  type Index uint64
    14  
    15  // Revision is a revision number
    16  type Revision uint64
    17  
    18  // NewUUID generates a new uuid
    19  func NewUUID() uuid.UUID {
    20  	newUUID, err := uuid.NewUUID()
    21  	if err != nil {
    22  		newUUID = uuid.New()
    23  	}
    24  	return newUUID
    25  }