go.ligato.io/vpp-agent/v3@v3.5.0/cmd/agentctl/api/types/types.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 types
    16  
    17  // ErrorResponse represents an error.
    18  type ErrorResponse struct {
    19  	Message string `json:"message"`
    20  }
    21  
    22  // Version contains response of Agent REST API:
    23  // GET "/info/version"
    24  type Version struct {
    25  	App       string
    26  	Version   string
    27  	GitCommit string
    28  	GitBranch string
    29  
    30  	BuildUser string
    31  	BuildHost string
    32  	BuildTime int64
    33  
    34  	GoVersion string
    35  	OS        string
    36  	Arch      string
    37  
    38  	APIVersion string
    39  	OSType     string
    40  }
    41  
    42  type Logger struct {
    43  	Logger string
    44  	Level  string `json:"level,omitempty"`
    45  }
    46  
    47  // Model provides info about registered model.
    48  type Model struct {
    49  	Name         string
    50  	Class        string
    51  	Module       string
    52  	Type         string
    53  	Version      string
    54  	KeyPrefix    string
    55  	NameTemplate string `json:",omitempty"`
    56  	ProtoName    string
    57  	ProtoFile    string `json:",omitempty"`
    58  	GoType       string `json:",omitempty"`
    59  	PkgPath      string `json:",omitempty"`
    60  }