-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapi.go
24 lines (20 loc) · 1015 Bytes
/
api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (c) 2021 Circonus, Inc. <[email protected]>
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
package trapcheck
//go:generate moq -out api_moq_test.go . API
import "github.com/circonus-labs/go-apiclient"
type API interface {
// generic methods
Get(requrl string) ([]byte, error)
// broker methods
FetchBroker(cid apiclient.CIDType) (*apiclient.Broker, error)
FetchBrokers() (*[]apiclient.Broker, error)
SearchBrokers(searchCriteria *apiclient.SearchQueryType, filterCriteria *apiclient.SearchFilterType) (*[]apiclient.Broker, error)
// check bundle methods
FetchCheckBundle(cid apiclient.CIDType) (*apiclient.CheckBundle, error)
CreateCheckBundle(cfg *apiclient.CheckBundle) (*apiclient.CheckBundle, error)
SearchCheckBundles(searchCriteria *apiclient.SearchQueryType, filterCriteria *apiclient.SearchFilterType) (*[]apiclient.CheckBundle, error)
UpdateCheckBundle(cfg *apiclient.CheckBundle) (*apiclient.CheckBundle, error)
}