go.ligato.io/vpp-agent/v3@v3.5.0/examples/kvscheduler/plugin_skeleton/without_metadata/model/keys.go (about)

     1  // Copyright (c) 2019 Cisco and/or its affiliates.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at:
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package model
    16  
    17  import (
    18  	"go.ligato.io/vpp-agent/v3/pkg/models"
    19  )
    20  
    21  // ModuleName is the module name used for all the models of this plugin.
    22  const ModuleName = "skeleton"
    23  
    24  var (
    25  	ValueModel = models.Register(&ValueSkeleton{}, models.Spec{
    26  		Module:  ModuleName,
    27  		Version: "v1",
    28  		Type:    "skeleton-value",
    29  	})
    30  )
    31  
    32  // ValueSkeletonKey returns the key used in NB DB to store the configuration
    33  // of a skeleton value with the given logical name.
    34  func ValueSkeletonKey(name string) string {
    35  	return models.Key(&ValueSkeleton{
    36  		Name: name,
    37  	})
    38  }