blob: 8f55688000956d00783829ecfeb6bdaab34cf34d [file] [log] [blame]
khenaidoobf6e7bb2018-08-14 22:27:29 -04001/*
2 * Copyright 2018-present Open Networking Foundation
3
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7
8 * http://www.apache.org/licenses/LICENSE-2.0
9
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Stephane Barbarie4a2564d2018-07-26 11:02:58 -040016package model
17
18type CallbackType uint8
19
20const (
21 GET CallbackType = iota
22 PRE_UPDATE
23 POST_UPDATE
24 PRE_ADD
25 POST_ADD
26 PRE_REMOVE
27 POST_REMOVE
28 POST_LISTCHANGE
29)
30
31var enumCallbackTypes = []string{
32 "GET",
33 "PRE_UPDATE",
34 "POST_UPDATE",
35 "PRE_ADD",
36 "POST_ADD",
37 "PRE_REMOVE",
38 "POST_REMOVE",
39 "POST_LISTCHANGE",
40}
41
42func (t CallbackType) String() string {
43 return enumCallbackTypes[t]
44}