Skip to content

Commit

Permalink
feat(servicelevel): generate servicelevel API
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrombley committed Aug 4, 2021
1 parent 10e1f15 commit 81c1125
Show file tree
Hide file tree
Showing 8 changed files with 1,569 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .tutone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ packages:
- "GetName() string"
- "GetTags() []EntityTag"
- "GetType() string"
- "GetServiceLevel() ServiceLevelDefinition"
- name: AlertableEntity
generate_struct_getters: true
- name: ApmApplicationEntity
Expand Down Expand Up @@ -796,6 +797,46 @@ packages:
field_type_override: users.UserReference
skip_type_create: true

- name: servicelevel
path: pkg/servicelevel
import_path: github.com/newrelic/newrelic-client-go/pkg/servicelevel
generators:
- typegen
- nerdgraphclient
imports:
- github.com/newrelic/newrelic-client-go/pkg/accounts
- github.com/newrelic/newrelic-client-go/pkg/entities
- github.com/newrelic/newrelic-client-go/pkg/nrtime
- github.com/newrelic/newrelic-client-go/pkg/users
types:
- name: User
- name: UserReference
mutations:
- name: serviceLevelCreate
max_query_field_depth: 3
- name: serviceLevelDelete
max_query_field_depth: 3
- name: serviceLevelUpdate
max_query_field_depth: 3
types:
- name: ServiceLevelIndicator
- name: ServiceLevelIndicatorCreateInput
- name: ServiceLevelIndicatorUpdateInput
#
# Types owned by other packages
#
# List of entities
- name: Entity
field_type_override: entities.Entity
skip_type_create: true
- name: EntityGuid
field_type_override: entities.EntityGUID
skip_type_create: true
# UpdateAt returns `null`, so this needs to be a ptr (can't override just the UpdatedAt field)
- name: EpochMilliseconds
field_type_override: "*nrtime.EpochMilliseconds"
skip_type_create: true

generators:
- name: typegen
fileName: "types.go"
Expand Down
2 changes: 2 additions & 0 deletions newrelic/newrelic.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/newrelic/newrelic-client-go/pkg/nrqldroprules"
"github.com/newrelic/newrelic-client-go/pkg/plugins"
"github.com/newrelic/newrelic-client-go/pkg/region"
"github.com/newrelic/newrelic-client-go/pkg/servicelevel"
"github.com/newrelic/newrelic-client-go/pkg/synthetics"
"github.com/newrelic/newrelic-client-go/pkg/workloads"
)
Expand All @@ -50,6 +51,7 @@ type NewRelic struct {
Nrdb nrdb.Nrdb
Nrqldroprules nrqldroprules.Nrqldroprules
Plugins plugins.Plugins
ServiceLevel servicelevel.Servicelevel
Synthetics synthetics.Synthetics
Workloads workloads.Workloads

Expand Down
Loading

0 comments on commit 81c1125

Please sign in to comment.