suzuki-shunsuke/go-graylog

@suzuki-shunsuke according to the official API we don't have 'ID - 0'

Closed this issue · 0 comments

@suzuki-shunsuke according to the official API we don't have 'ID - 0'
only these values were allowed.

[
  {
    "id": 1,
    "name": "EXACT",
    "short_desc": "match exactly",
    "long_desc": "match exactly"
  },
  {
    "id": 2,
    "name": "REGEX",
    "short_desc": "match regular expression",
    "long_desc": "match regular expression"
  },
  {
    "id": 3,
    "name": "GREATER",
    "short_desc": "greater than",
    "long_desc": "be greater than"
  },
  {
    "id": 4,
    "name": "SMALLER",
    "short_desc": "smaller than",
    "long_desc": "be smaller than"
  },
  {
    "id": 5,
    "name": "PRESENCE",
    "short_desc": "field presence",
    "long_desc": "be present"
  },
  {
    "id": 6,
    "name": "CONTAINS",
    "short_desc": "contain",
    "long_desc": "contain"
  },
  {
    "id": 7,
    "name": "ALWAYS_MATCH",
    "short_desc": "always match",
    "long_desc": "always match"
  }
]

maybe we should use "name" instead of 'id' ? For me it's a little bit strange that API allows us creating 'broken' resources. I have made the issue in the graylog bugtracker
Graylog2/graylog2-server#6382.
sorry for my b English

Originally posted by @dzirg44 in #127 (comment)