Documentation
¶
Overview ¶
Package service defines interfaces representing the Turbine Labs public API
Index ¶
- Constants
- type AccessToken
- type AccessTokenFilter
- type Admin
- type All
- type Cluster
- type ClusterFilter
- type Domain
- type DomainFilter
- type History
- type Listener
- type ListenerFilter
- type MockAccessToken
- func (m *MockAccessToken) Create(token api.AccessToken) (api.AccessToken, error)
- func (m *MockAccessToken) Delete(key api.AccessTokenKey, checksum api.Checksum) error
- func (m *MockAccessToken) EXPECT() *MockAccessTokenMockRecorder
- func (m *MockAccessToken) Get(key api.AccessTokenKey) (api.AccessToken, error)
- func (m *MockAccessToken) Index(filters ...AccessTokenFilter) (api.AccessTokens, error)
- type MockAccessTokenMockRecorder
- func (mr *MockAccessTokenMockRecorder) Create(token interface{}) *gomock.Call
- func (mr *MockAccessTokenMockRecorder) Delete(key, checksum interface{}) *gomock.Call
- func (mr *MockAccessTokenMockRecorder) Get(key interface{}) *gomock.Call
- func (mr *MockAccessTokenMockRecorder) Index(filters ...interface{}) *gomock.Call
- type MockAdmin
- type MockAdminMockRecorder
- type MockAll
- func (m *MockAll) Cluster() Cluster
- func (m *MockAll) Domain() Domain
- func (m *MockAll) EXPECT() *MockAllMockRecorder
- func (m *MockAll) History() History
- func (m *MockAll) Listener() Listener
- func (m *MockAll) Proxy() Proxy
- func (m *MockAll) Route() Route
- func (m *MockAll) SharedRules() SharedRules
- func (m *MockAll) Zone() Zone
- type MockAllMockRecorder
- func (mr *MockAllMockRecorder) Cluster() *gomock.Call
- func (mr *MockAllMockRecorder) Domain() *gomock.Call
- func (mr *MockAllMockRecorder) History() *gomock.Call
- func (mr *MockAllMockRecorder) Listener() *gomock.Call
- func (mr *MockAllMockRecorder) Proxy() *gomock.Call
- func (mr *MockAllMockRecorder) Route() *gomock.Call
- func (mr *MockAllMockRecorder) SharedRules() *gomock.Call
- func (mr *MockAllMockRecorder) Zone() *gomock.Call
- type MockCluster
- func (m *MockCluster) AddInstance(clusterKey api.ClusterKey, checksum api.Checksum, instance api.Instance) (api.Cluster, error)
- func (m *MockCluster) Create(cluster api.Cluster) (api.Cluster, error)
- func (m *MockCluster) Delete(clusterKey api.ClusterKey, checksum api.Checksum) error
- func (m *MockCluster) EXPECT() *MockClusterMockRecorder
- func (m *MockCluster) Get(clusterKey api.ClusterKey) (api.Cluster, error)
- func (m *MockCluster) Index(filters ...ClusterFilter) (api.Clusters, error)
- func (m *MockCluster) Modify(cluster api.Cluster) (api.Cluster, error)
- func (m *MockCluster) RemoveInstance(clusterKey api.ClusterKey, checksum api.Checksum, instance api.Instance) (api.Cluster, error)
- type MockClusterMockRecorder
- func (mr *MockClusterMockRecorder) AddInstance(clusterKey, checksum, instance interface{}) *gomock.Call
- func (mr *MockClusterMockRecorder) Create(cluster interface{}) *gomock.Call
- func (mr *MockClusterMockRecorder) Delete(clusterKey, checksum interface{}) *gomock.Call
- func (mr *MockClusterMockRecorder) Get(clusterKey interface{}) *gomock.Call
- func (mr *MockClusterMockRecorder) Index(filters ...interface{}) *gomock.Call
- func (mr *MockClusterMockRecorder) Modify(cluster interface{}) *gomock.Call
- func (mr *MockClusterMockRecorder) RemoveInstance(clusterKey, checksum, instance interface{}) *gomock.Call
- type MockDomain
- func (m *MockDomain) Create(domain api.Domain) (api.Domain, error)
- func (m *MockDomain) Delete(domainKey api.DomainKey, checksum api.Checksum) error
- func (m *MockDomain) EXPECT() *MockDomainMockRecorder
- func (m *MockDomain) Get(domainKey api.DomainKey) (api.Domain, error)
- func (m *MockDomain) Index(filters ...DomainFilter) (api.Domains, error)
- func (m *MockDomain) Modify(domain api.Domain) (api.Domain, error)
- type MockDomainMockRecorder
- func (mr *MockDomainMockRecorder) Create(domain interface{}) *gomock.Call
- func (mr *MockDomainMockRecorder) Delete(domainKey, checksum interface{}) *gomock.Call
- func (mr *MockDomainMockRecorder) Get(domainKey interface{}) *gomock.Call
- func (mr *MockDomainMockRecorder) Index(filters ...interface{}) *gomock.Call
- func (mr *MockDomainMockRecorder) Modify(domain interface{}) *gomock.Call
- type MockHistory
- func (m *MockHistory) ClusterGraph(clusterKey api.ClusterKey, start, stop time.Time) ([]api.ChangeDescription, error)
- func (m *MockHistory) DomainGraph(domainKey api.DomainKey, start, stop time.Time) ([]api.ChangeDescription, error)
- func (m *MockHistory) EXPECT() *MockHistoryMockRecorder
- func (m *MockHistory) Index(filters changelog.FilterExpr, start, end time.Time) ([]api.ChangeDescription, error)
- func (m *MockHistory) RouteGraph(routeKey api.RouteKey, start, stop time.Time) ([]api.ChangeDescription, error)
- func (m *MockHistory) SharedRulesGraph(sharedRulesKey api.SharedRulesKey, start, stop time.Time) ([]api.ChangeDescription, error)
- func (m *MockHistory) Zone(zoneKey api.ZoneKey, start, stop time.Time) ([]api.ChangeDescription, error)
- type MockHistoryMockRecorder
- func (mr *MockHistoryMockRecorder) ClusterGraph(clusterKey, start, stop interface{}) *gomock.Call
- func (mr *MockHistoryMockRecorder) DomainGraph(domainKey, start, stop interface{}) *gomock.Call
- func (mr *MockHistoryMockRecorder) Index(filters, start, end interface{}) *gomock.Call
- func (mr *MockHistoryMockRecorder) RouteGraph(routeKey, start, stop interface{}) *gomock.Call
- func (mr *MockHistoryMockRecorder) SharedRulesGraph(sharedRulesKey, start, stop interface{}) *gomock.Call
- func (mr *MockHistoryMockRecorder) Zone(zoneKey, start, stop interface{}) *gomock.Call
- type MockListener
- func (m *MockListener) Create(listener api.Listener) (api.Listener, error)
- func (m *MockListener) Delete(listenerKey api.ListenerKey, checksum api.Checksum) error
- func (m *MockListener) EXPECT() *MockListenerMockRecorder
- func (m *MockListener) Get(listenerKey api.ListenerKey) (api.Listener, error)
- func (m *MockListener) Index(filters ...ListenerFilter) (api.Listeners, error)
- func (m *MockListener) Modify(listener api.Listener) (api.Listener, error)
- type MockListenerMockRecorder
- func (mr *MockListenerMockRecorder) Create(listener interface{}) *gomock.Call
- func (mr *MockListenerMockRecorder) Delete(listenerKey, checksum interface{}) *gomock.Call
- func (mr *MockListenerMockRecorder) Get(listenerKey interface{}) *gomock.Call
- func (mr *MockListenerMockRecorder) Index(filters ...interface{}) *gomock.Call
- func (mr *MockListenerMockRecorder) Modify(listener interface{}) *gomock.Call
- type MockOrg
- func (m *MockOrg) Create(org api.Org) (api.Org, error)
- func (m *MockOrg) Delete(orgKey api.OrgKey, checksum api.Checksum) error
- func (m *MockOrg) EXPECT() *MockOrgMockRecorder
- func (m *MockOrg) Get(orgKey api.OrgKey) (api.Org, error)
- func (m *MockOrg) Index(filters ...OrgFilter) (api.Orgs, error)
- func (m *MockOrg) Modify(org api.Org) (api.Org, error)
- type MockOrgMockRecorder
- func (mr *MockOrgMockRecorder) Create(org interface{}) *gomock.Call
- func (mr *MockOrgMockRecorder) Delete(orgKey, checksum interface{}) *gomock.Call
- func (mr *MockOrgMockRecorder) Get(orgKey interface{}) *gomock.Call
- func (mr *MockOrgMockRecorder) Index(filters ...interface{}) *gomock.Call
- func (mr *MockOrgMockRecorder) Modify(org interface{}) *gomock.Call
- type MockProxy
- func (m *MockProxy) Create(proxy api.Proxy) (api.Proxy, error)
- func (m *MockProxy) Delete(proxyKey api.ProxyKey, checksum api.Checksum) error
- func (m *MockProxy) EXPECT() *MockProxyMockRecorder
- func (m *MockProxy) Get(proxyKey api.ProxyKey) (api.Proxy, error)
- func (m *MockProxy) Index(filters ...ProxyFilter) (api.Proxies, error)
- func (m *MockProxy) Modify(proxy api.Proxy) (api.Proxy, error)
- type MockProxyMockRecorder
- func (mr *MockProxyMockRecorder) Create(proxy interface{}) *gomock.Call
- func (mr *MockProxyMockRecorder) Delete(proxyKey, checksum interface{}) *gomock.Call
- func (mr *MockProxyMockRecorder) Get(proxyKey interface{}) *gomock.Call
- func (mr *MockProxyMockRecorder) Index(filters ...interface{}) *gomock.Call
- func (mr *MockProxyMockRecorder) Modify(proxy interface{}) *gomock.Call
- type MockProxyRef
- type MockProxyRefMockRecorder
- type MockRoute
- func (m *MockRoute) Create(route api.Route) (api.Route, error)
- func (m *MockRoute) Delete(routeKey api.RouteKey, checksum api.Checksum) error
- func (m *MockRoute) EXPECT() *MockRouteMockRecorder
- func (m *MockRoute) Get(routeKey api.RouteKey) (api.Route, error)
- func (m *MockRoute) Index(filters ...RouteFilter) (api.Routes, error)
- func (m *MockRoute) Modify(route api.Route) (api.Route, error)
- type MockRouteMockRecorder
- func (mr *MockRouteMockRecorder) Create(route interface{}) *gomock.Call
- func (mr *MockRouteMockRecorder) Delete(routeKey, checksum interface{}) *gomock.Call
- func (mr *MockRouteMockRecorder) Get(routeKey interface{}) *gomock.Call
- func (mr *MockRouteMockRecorder) Index(filters ...interface{}) *gomock.Call
- func (mr *MockRouteMockRecorder) Modify(route interface{}) *gomock.Call
- type MockSharedRules
- func (m *MockSharedRules) Create(route api.SharedRules) (api.SharedRules, error)
- func (m *MockSharedRules) Delete(sharedRulesKey api.SharedRulesKey, checksum api.Checksum) error
- func (m *MockSharedRules) EXPECT() *MockSharedRulesMockRecorder
- func (m *MockSharedRules) Get(sharedRulesKey api.SharedRulesKey) (api.SharedRules, error)
- func (m *MockSharedRules) Index(filters ...SharedRulesFilter) (api.SharedRulesSlice, error)
- func (m *MockSharedRules) Modify(route api.SharedRules) (api.SharedRules, error)
- type MockSharedRulesMockRecorder
- func (mr *MockSharedRulesMockRecorder) Create(route interface{}) *gomock.Call
- func (mr *MockSharedRulesMockRecorder) Delete(sharedRulesKey, checksum interface{}) *gomock.Call
- func (mr *MockSharedRulesMockRecorder) Get(sharedRulesKey interface{}) *gomock.Call
- func (mr *MockSharedRulesMockRecorder) Index(filters ...interface{}) *gomock.Call
- func (mr *MockSharedRulesMockRecorder) Modify(route interface{}) *gomock.Call
- type MockUser
- func (m *MockUser) Create(user api.User) (api.User, error)
- func (m *MockUser) Delete(userKey api.UserKey, checksum api.Checksum) error
- func (m *MockUser) EXPECT() *MockUserMockRecorder
- func (m *MockUser) Get(userKey api.UserKey) (api.User, error)
- func (m *MockUser) Index(filters ...UserFilter) (api.Users, error)
- func (m *MockUser) Modify(user api.User) (api.User, error)
- type MockUserMockRecorder
- func (mr *MockUserMockRecorder) Create(user interface{}) *gomock.Call
- func (mr *MockUserMockRecorder) Delete(userKey, checksum interface{}) *gomock.Call
- func (mr *MockUserMockRecorder) Get(userKey interface{}) *gomock.Call
- func (mr *MockUserMockRecorder) Index(filters ...interface{}) *gomock.Call
- func (mr *MockUserMockRecorder) Modify(user interface{}) *gomock.Call
- type MockZone
- func (m *MockZone) Create(zone api.Zone) (api.Zone, error)
- func (m *MockZone) Delete(zoneKey api.ZoneKey, checksum api.Checksum) error
- func (m *MockZone) EXPECT() *MockZoneMockRecorder
- func (m *MockZone) Get(zoneKey api.ZoneKey) (api.Zone, error)
- func (m *MockZone) Index(filters ...ZoneFilter) (api.Zones, error)
- func (m *MockZone) Modify(zone api.Zone) (api.Zone, error)
- type MockZoneMockRecorder
- func (mr *MockZoneMockRecorder) Create(zone interface{}) *gomock.Call
- func (mr *MockZoneMockRecorder) Delete(zoneKey, checksum interface{}) *gomock.Call
- func (mr *MockZoneMockRecorder) Get(zoneKey interface{}) *gomock.Call
- func (mr *MockZoneMockRecorder) Index(filters ...interface{}) *gomock.Call
- func (mr *MockZoneMockRecorder) Modify(zone interface{}) *gomock.Call
- type MockZoneRef
- type MockZoneRefMockRecorder
- type Org
- type OrgFilter
- type Proxy
- type ProxyFilter
- type ProxyRef
- type Route
- type RouteFilter
- type SharedRules
- type SharedRulesFilter
- type User
- type UserFilter
- type Zone
- type ZoneFilter
- type ZoneRef
Constants ¶
const None = "-"
None is a monitor value used to incidate an empty array
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken interface {
// GET /v1.0/admin/user/self/access_token
//
// Index returns all AccessTokens to which the given filters apply. All non-empty
// fields in a filter must apply for the filter to apply. Any AccessToken to which
// any filter applies is included in the result.
//
// If no filters are supplied, all AccessTokens are returned.
Index(filters ...AccessTokenFilter) (api.AccessTokens, error)
// GET /v1.0/admin/user/self/access_token/<string:AccessTokenKey>
//
// Get returns an AccessToken for the given AccessTokenKey. If the AccessToken
// does not exist, an error is returned.
Get(key api.AccessTokenKey) (api.AccessToken, error)
// POST /v1.0/admin/user/self/access_token
//
// Create creates the given AccessToken. AccessToken description should explain
// the intended use of the key that will be issued. Any fields other than
// Description specified in the POSTed AccessToken are ignored.
//
// The response will have the SignedToken field populated and is the only chance a
// caller will have to save this value. An AccessToken may be revoked by calling
// Delete below.
Create(token api.AccessToken) (api.AccessToken, error)
// DELETE /v1.0/admin/user/self/access_token/<string:AccessTokenKey>?checksum=<checksum>
//
// Delete completely removes the AccessToken data from the database.
// If the checksum does not match no action is taken and an error
// is returned.
Delete(key api.AccessTokenKey, checksum api.Checksum) error
}
type AccessTokenFilter ¶
type AccessTokenFilter struct {
Description string `json:"description"`
AccessTokenKey api.AccessTokenKey `json:"access_token_key"`
UserKey api.UserKey `json:"user_key"`
OrgKey api.OrgKey `json:"org_key"`
CreatedAfter *time.Time `json:"created_after"`
CreatedBefore *time.Time `json:"created_before"`
}
AccessTokenFilter describes a filter on the full list of AccessTokens
func (AccessTokenFilter) Equals ¶
func (of AccessTokenFilter) Equals(o AccessTokenFilter) bool
Equals returns true if the target is equal to the receiver
func (AccessTokenFilter) IsNil ¶
func (of AccessTokenFilter) IsNil() bool
IsNil returns true if the receiver is the zero value
type Admin ¶
type Admin interface {
User() User
// AccessToken returns an interface to interact with the access tokens
// for the user who is making an authenticated request.
AccessToken() AccessToken
}
Admin defines the interface for the public JSON/REST administrative API.
See All for a discussion of the methodology behind this interface.
type All ¶
type All interface {
Cluster() Cluster
Domain() Domain
Route() Route
Proxy() Proxy
Listener() Listener
Zone() Zone
History() History
}
All defines the interface for the public JSON/REST API.
We define it in Go because it's convenient to allow our Go clients and servers to share a common language-level interface.
Where necessary, we add commentary to describe things about the REST api that aren't documented by the language itself (eg paths, methods, etc)
Each of the sub-interfaces presents an organization-scoped view. The method of scoping is not specified here, but in HTTP implementations will be the use of an authorization header.
type Cluster ¶
type Cluster interface {
// GET /v1.0/cluster
//
// Index returns all Clusters to which the given filters apply. All non-empty
// fields in a filter must apply for the filter to apply. Any Cluster to which
// any filter applies is included in the result.
//
// If no filters are supplied, all Clusters are returned.
Index(filters ...ClusterFilter) (api.Clusters, error)
// GET /v1.0/cluster/<string:clusterKey>[?include_deleted]
//
// Get returns a Cluster for the given ClusterKey. If the Cluster does not
// exist, an error is returned.
Get(clusterKey api.ClusterKey) (api.Cluster, error)
// POST /v1.0/cluster
//
// Create creates the given Cluster. Cluster Names must be unique for a given
// ZoneKey. If a ClusterKey is specified in the Cluster, it is ignored and
// replaced in the result with the authoritative ClusterKey.
Create(cluster api.Cluster) (api.Cluster, error)
// PUT /v1.0/cluster/<string:clusterKey>
//
// Modify modifies the given Cluster. Cluster Names must be unique for a given
// ZoneKey. The given Cluster Checksum must match the existing Checksum.
Modify(cluster api.Cluster) (api.Cluster, error)
// DELETE /v1.0/cluster/<string:clusterKey>?checksum=<string:checksum>
//
// Delete completely removes the Cluster from the database.
// If the checksum does not match no action is taken and an error
// is returned.
Delete(clusterKey api.ClusterKey, checksum api.Checksum) error
// POST /v1.0/cluster/<string:clusterKey>/instances
//
// AddInstance adds an Instance to the Cluster corresponding to the given
// ClusterKey. The given Cluster Checksum must match the existing Checksum.
// If the Instance already exists, it will be updated.
AddInstance(
clusterKey api.ClusterKey,
checksum api.Checksum,
instance api.Instance,
) (api.Cluster, error)
// DELETE /v1.0/cluster/<string:clusterKey>/instances/<string:host>:<int:port>
//
// RemoveInstance removes an Instance from the Cluster corresponding to the
// given ClusterKey. The given Cluster Checksum must match the existing
// Checksum.
RemoveInstance(
clusterKey api.ClusterKey,
checksum api.Checksum,
instance api.Instance,
) (api.Cluster, error)
}
Cluster describes the CRUD interface for api.Clusters
type ClusterFilter ¶
type ClusterFilter struct {
ClusterKey api.ClusterKey `json:"cluster_key"`
Name string `json:"name"`
ZoneKey api.ZoneKey `json:"zone_key"`
OrgKey api.OrgKey `json:"org_key"`
}
ClusterFilter describes a filter on the full list of Clusters
func (ClusterFilter) Equals ¶
func (cf ClusterFilter) Equals(o ClusterFilter) bool
Equals returns true if the target is equal to the receiver
func (ClusterFilter) IsNil ¶
func (cf ClusterFilter) IsNil() bool
IsNil returns true if the receiver is the zero value
type Domain ¶
type Domain interface {
// GET /v1.0/domains
//
// Index returns all Domains to which the given filters apply. All non-empty
// fields in a filter must apply for the filter to apply. Any Domain to which
// any filter applies is included in the result.
//
// If no filters are supplied, all Domains are returned.
Index(filters ...DomainFilter) (api.Domains, error)
// GET /v1.0/domains/<string:domainKey>[?include_deleted]
//
// Get returns a Domain for the given DomainKey. If the Domain does not
// exist, an error is returned.
Get(domainKey api.DomainKey) (api.Domain, error)
// POST /v1.0/domains
//
// Create creates the given Domain. The tuple of (Host, Port, ZoneKey) must be
// unique. If a DomainKey is specified in the Domain, it is ignored and
// replaced in the result with the authoritative DomainKey.
Create(domain api.Domain) (api.Domain, error)
// PUT /v1.0/domains/<string:domainKey>
//
// Modify modifies the given Domain. The tuple of (Host, Port, ZoneKey) must
// be unique. The given Domain Checksum must match the existing Checksum.
Modify(domain api.Domain) (api.Domain, error)
// DELETE /v1.0/domains/<string:domainKey>?checksum=<string:checksum>
//
// Delete completely removes the Domain from the database.
// If the checksum does not match no action is taken and an error
// is returned.
Delete(domainKey api.DomainKey, checksum api.Checksum) error
}
Domain describes the CRUD interface for api.Domains
type DomainFilter ¶
type DomainFilter struct {
DomainKey api.DomainKey `json:"domain_key"`
Name string `json:"name"`
ZoneKey api.ZoneKey `json:"zone_key"`
OrgKey api.OrgKey `json:"org_key"`
// ProxyKeys matches Domains with a superset of the specified ProxyKeys. A
// slice with a single value of "-" will produce Domains with no linked
// Proxies.
ProxyKeys []api.ProxyKey `json:"proxy_keys"`
}
DomainFilter describes a filter on the full list of Domains per #5628 we should add the ability to find Listeners a Domain is attached to
func (DomainFilter) Equals ¶
func (df DomainFilter) Equals(o DomainFilter) bool
Equals returns true if the target is equal to the receiver
func (DomainFilter) HasNoProxies ¶
func (df DomainFilter) HasNoProxies() bool
HasNoProxies returns true if ProxyKeys has been set to the monitor value indicating a filter for Domains with no linked Proxies.
func (DomainFilter) IsNil ¶
func (df DomainFilter) IsNil() bool
IsNil returns true if the receiver is the zero value
type History ¶
type History interface {
// GET /v1.0/changelog/adhoc[?filter=<json>&start=time_utc_usec>&stop=<time_utc_usec>]
//
// Index provides a generalized search interface for changes that the API has
// recorded. The filter to be applied should be a FilterOrs as described in
// changelog docs. It may be URL encoded JSON and set as the value to the
// 'filter' query param. Humane encoding is also available; if used the query
// param names and values are derived from the encoded struct FilterOrs and
// are based on the `form` struct tag.
//
// If no filters are specified when making the HTTP call all changes in the
// org of the requesting user will be returned within the time window.
//
// If neither start nor end time is specified the default will be treated as
// the previous three hours to current time. If only one endpoint is provided
// the other will be inferred such that a three hour window is examined.
Index(
filters changelog.FilterExpr,
start,
end time.Time,
) ([]api.ChangeDescription, error)
// GET /v1.0/changelog/domain-graph/<key>[?start=<time_utc_usec>&stop=<time_utc_usec>]
//
// DomainGraph returns any changes within the object graph of the domain
// specified by domainKey. Specifically this includes changes to:
//
// 1. the domain itself
// 2. the set of proxies which route to the domain (note: doesn't include
// changes to the proxies themselves only the routing set)
// 3. the routes that were a part of the domain during any part of the
// window (including routes which were initially added then removed
// during the window)
// 4. any cluster referenced by any rules that was a part of the domain
// during the window.
//
// If one of the window sides are unset it will be filled to the default
// window size. If both window edges are zero-value they will be set to
// a window of the default size ending at the current time.
//
// If the window (stop - start) exceeds the maximum size or stop < start
// an error will be returned.
//
// The maximum duration is 24 hours. The default window size is 1 hour.
//
// TODO: pull in org key hint (for query efficiency)
// https://github.com/turbinelabs/tbn/issues/1022
DomainGraph(
domainKey api.DomainKey,
start,
stop time.Time,
) ([]api.ChangeDescription, error)
// GET /v1.0/changelog/route-graph/<key>[?start=<time_utc_usec>&stop=<time_utc_usec>]
//
// RouteGraph returns any changes within a set window on a route or the clusters
// within that route.
//
// If the window (stop - start) exceeds the maximum size or stop < start
// an error will be returned.
//
// The maximum duration is 24 hours. The default window size is 1 hour.
RouteGraph(
routeKey api.RouteKey,
start,
stop time.Time,
) ([]api.ChangeDescription, error)
//
// SharedRulesGraph returns any changes to a SharedRules object within a set window.
//
// If the window (stop - start) exceeds the maximum size or stop < start an
// error will be returned.
//
// The maximum duration is 24 hours. The default window size is 1 hour.
SharedRulesGraph(
sharedRulesKey api.SharedRulesKey,
start,
stop time.Time,
) ([]api.ChangeDescription, error)
// GET /v1.0/changelog/cluster-graph/<key>[?start=<time_utc_usec>&stop=<time_utc_usec>]
//
// ClusterGraph returns any changes to a cluster and any domains that have
// started, or stopped, routing to a cluster within a set window.
//
// If the window (stop - start) exceeds the maximum size or stop < start
// an error will be returned.
//
// The maximum duration of 24 hours. The default window size is 1 hour.
ClusterGraph(
clusterKey api.ClusterKey,
start,
stop time.Time,
) ([]api.ChangeDescription, error)
// GET /v1.0/changelog/zone/<key>[?start=<time_utc_usec>&stop=<time_utc_usec>]
//
// Zone returns any changes within a Zone that occurred during a window.
//
// If the window (stop - start) exceeds the maximum size or stop < start
// an error will be returned.
//
// The maximum duration of 24 hours. The default window size is 1 hour.
Zone(
zoneKey api.ZoneKey,
start,
stop time.Time,
) ([]api.ChangeDescription, error)
}
type Listener ¶
type Listener interface {
// GET /v1.0/listeners
//
// Index returns all listeners to which the given filters apply. All non-empty
// fields in a filter must apply for the filter to apply. Any Listener to which
// any filter applies is included in the result.
//
// If no filters are supplied, all Listeners are returned.
Index(filters ...ListenerFilter) (api.Listeners, error)
// GET /v1.0/listeners/<string:listenerKey>[?include_deleted]
//
// Get returns a Listener for the given ListenerKey. If the Listener does not
// exist, an error is returned.
Get(listenerKey api.ListenerKey) (api.Listener, error)
// POST /v1.0/listeners
//
// Create creates the given Listener. The tuple of (Host, Port, ZoneKey) must be
// unique. If a ListenerKey is specified in the Listener, it is ignored and
// replaced in the result with the authoritative ListenerKey.
Create(listener api.Listener) (api.Listener, error)
// PUT /v1.0/listeners/<string:listenerKey>
//
// Modify Modifies the given Listener. The tuple of (Host, Port, ZoneKey) must be
// unique. The given Listener Checksum must match the existing Checksum.
Modify(listener api.Listener) (api.Listener, error)
// DELETE /v1.0/listeners/<string:listenerKey>?checksum=<string:checksum>
//
// Delete completely removes the Listener from the database.
// If the checksum does not match no action is taken and an error
// is returned.
Delete(listenerKey api.ListenerKey, checksum api.Checksum) error
}
Listener describes the CRUD interface for api.Listener
type ListenerFilter ¶
type ListenerFilter struct {
ListenerKey api.ListenerKey `json:"listener_key"`
Name string `json:"name"`
// DomainKeys matches Listeners with a superset of the specified DomainKeys. A
// slice with a single value of "-" will produce Listeners with no linked
// Domains.
DomainKeys []api.DomainKey `json:"domain_keys"`
ZoneKey api.ZoneKey `json:"zone_key"`
OrgKey api.OrgKey `json:"org_key"`
}
ListenerFilter describes a filter on the full list of Listeners per #5629 we should add the ability to find Proxies a Listener is attached to
func (ListenerFilter) Equals ¶
func (lf ListenerFilter) Equals(o ListenerFilter) bool
Equals returns true if the target is equal to the receiver
func (ListenerFilter) HasNoDomains ¶
func (lf ListenerFilter) HasNoDomains() bool
HasNoDomains returns true if DomainKeys has been set to the monitor value indicating a filter for Listeners with no linked Domains.
func (ListenerFilter) IsNil ¶
func (lf ListenerFilter) IsNil() bool
IsNil returns true if the receiver is the zero value
type MockAccessToken ¶
type MockAccessToken struct {
// contains filtered or unexported fields
}
MockAccessToken is a mock of AccessToken interface
func NewMockAccessToken ¶
func NewMockAccessToken(ctrl *gomock.Controller) *MockAccessToken
NewMockAccessToken creates a new mock instance
func (*MockAccessToken) Create ¶
func (m *MockAccessToken) Create(token api.AccessToken) (api.AccessToken, error)
Create mocks base method
func (*MockAccessToken) Delete ¶
func (m *MockAccessToken) Delete(key api.AccessTokenKey, checksum api.Checksum) error
Delete mocks base method
func (*MockAccessToken) EXPECT ¶
func (m *MockAccessToken) EXPECT() *MockAccessTokenMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockAccessToken) Get ¶
func (m *MockAccessToken) Get(key api.AccessTokenKey) (api.AccessToken, error)
Get mocks base method
func (*MockAccessToken) Index ¶
func (m *MockAccessToken) Index(filters ...AccessTokenFilter) (api.AccessTokens, error)
Index mocks base method
type MockAccessTokenMockRecorder ¶
type MockAccessTokenMockRecorder struct {
// contains filtered or unexported fields
}
MockAccessTokenMockRecorder is the mock recorder for MockAccessToken
func (*MockAccessTokenMockRecorder) Create ¶
func (mr *MockAccessTokenMockRecorder) Create(token interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockAccessTokenMockRecorder) Delete ¶
func (mr *MockAccessTokenMockRecorder) Delete(key, checksum interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockAccessTokenMockRecorder) Get ¶
func (mr *MockAccessTokenMockRecorder) Get(key interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockAccessTokenMockRecorder) Index ¶
func (mr *MockAccessTokenMockRecorder) Index(filters ...interface{}) *gomock.Call
Index indicates an expected call of Index
type MockAdmin ¶
type MockAdmin struct {
// contains filtered or unexported fields
}
MockAdmin is a mock of Admin interface
func NewMockAdmin ¶
func NewMockAdmin(ctrl *gomock.Controller) *MockAdmin
NewMockAdmin creates a new mock instance
func (*MockAdmin) AccessToken ¶
func (m *MockAdmin) AccessToken() AccessToken
AccessToken mocks base method
func (*MockAdmin) EXPECT ¶
func (m *MockAdmin) EXPECT() *MockAdminMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockAdminMockRecorder ¶
type MockAdminMockRecorder struct {
// contains filtered or unexported fields
}
MockAdminMockRecorder is the mock recorder for MockAdmin
func (*MockAdminMockRecorder) AccessToken ¶
func (mr *MockAdminMockRecorder) AccessToken() *gomock.Call
AccessToken indicates an expected call of AccessToken
func (*MockAdminMockRecorder) User ¶
func (mr *MockAdminMockRecorder) User() *gomock.Call
User indicates an expected call of User
type MockAll ¶
type MockAll struct {
// contains filtered or unexported fields
}
MockAll is a mock of All interface
func NewMockAll ¶
func NewMockAll(ctrl *gomock.Controller) *MockAll
NewMockAll creates a new mock instance
func (*MockAll) EXPECT ¶
func (m *MockAll) EXPECT() *MockAllMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockAll) SharedRules ¶
func (m *MockAll) SharedRules() SharedRules
SharedRules mocks base method
type MockAllMockRecorder ¶
type MockAllMockRecorder struct {
// contains filtered or unexported fields
}
MockAllMockRecorder is the mock recorder for MockAll
func (*MockAllMockRecorder) Cluster ¶
func (mr *MockAllMockRecorder) Cluster() *gomock.Call
Cluster indicates an expected call of Cluster
func (*MockAllMockRecorder) Domain ¶
func (mr *MockAllMockRecorder) Domain() *gomock.Call
Domain indicates an expected call of Domain
func (*MockAllMockRecorder) History ¶
func (mr *MockAllMockRecorder) History() *gomock.Call
History indicates an expected call of History
func (*MockAllMockRecorder) Listener ¶
func (mr *MockAllMockRecorder) Listener() *gomock.Call
Listener indicates an expected call of Listener
func (*MockAllMockRecorder) Proxy ¶
func (mr *MockAllMockRecorder) Proxy() *gomock.Call
Proxy indicates an expected call of Proxy
func (*MockAllMockRecorder) Route ¶
func (mr *MockAllMockRecorder) Route() *gomock.Call
Route indicates an expected call of Route
func (*MockAllMockRecorder) SharedRules ¶
func (mr *MockAllMockRecorder) SharedRules() *gomock.Call
SharedRules indicates an expected call of SharedRules
func (*MockAllMockRecorder) Zone ¶
func (mr *MockAllMockRecorder) Zone() *gomock.Call
Zone indicates an expected call of Zone
type MockCluster ¶
type MockCluster struct {
// contains filtered or unexported fields
}
MockCluster is a mock of Cluster interface
func NewMockCluster ¶
func NewMockCluster(ctrl *gomock.Controller) *MockCluster
NewMockCluster creates a new mock instance
func (*MockCluster) AddInstance ¶
func (m *MockCluster) AddInstance(clusterKey api.ClusterKey, checksum api.Checksum, instance api.Instance) (api.Cluster, error)
AddInstance mocks base method
func (*MockCluster) Delete ¶
func (m *MockCluster) Delete(clusterKey api.ClusterKey, checksum api.Checksum) error
Delete mocks base method
func (*MockCluster) EXPECT ¶
func (m *MockCluster) EXPECT() *MockClusterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockCluster) Get ¶
func (m *MockCluster) Get(clusterKey api.ClusterKey) (api.Cluster, error)
Get mocks base method
func (*MockCluster) Index ¶
func (m *MockCluster) Index(filters ...ClusterFilter) (api.Clusters, error)
Index mocks base method
func (*MockCluster) RemoveInstance ¶
func (m *MockCluster) RemoveInstance(clusterKey api.ClusterKey, checksum api.Checksum, instance api.Instance) (api.Cluster, error)
RemoveInstance mocks base method
type MockClusterMockRecorder ¶
type MockClusterMockRecorder struct {
// contains filtered or unexported fields
}
MockClusterMockRecorder is the mock recorder for MockCluster
func (*MockClusterMockRecorder) AddInstance ¶
func (mr *MockClusterMockRecorder) AddInstance(clusterKey, checksum, instance interface{}) *gomock.Call
AddInstance indicates an expected call of AddInstance
func (*MockClusterMockRecorder) Create ¶
func (mr *MockClusterMockRecorder) Create(cluster interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockClusterMockRecorder) Delete ¶
func (mr *MockClusterMockRecorder) Delete(clusterKey, checksum interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockClusterMockRecorder) Get ¶
func (mr *MockClusterMockRecorder) Get(clusterKey interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockClusterMockRecorder) Index ¶
func (mr *MockClusterMockRecorder) Index(filters ...interface{}) *gomock.Call
Index indicates an expected call of Index
func (*MockClusterMockRecorder) Modify ¶
func (mr *MockClusterMockRecorder) Modify(cluster interface{}) *gomock.Call
Modify indicates an expected call of Modify
func (*MockClusterMockRecorder) RemoveInstance ¶
func (mr *MockClusterMockRecorder) RemoveInstance(clusterKey, checksum, instance interface{}) *gomock.Call
RemoveInstance indicates an expected call of RemoveInstance
type MockDomain ¶
type MockDomain struct {
// contains filtered or unexported fields
}
MockDomain is a mock of Domain interface
func NewMockDomain ¶
func NewMockDomain(ctrl *gomock.Controller) *MockDomain
NewMockDomain creates a new mock instance
func (*MockDomain) EXPECT ¶
func (m *MockDomain) EXPECT() *MockDomainMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockDomain) Index ¶
func (m *MockDomain) Index(filters ...DomainFilter) (api.Domains, error)
Index mocks base method
type MockDomainMockRecorder ¶
type MockDomainMockRecorder struct {
// contains filtered or unexported fields
}
MockDomainMockRecorder is the mock recorder for MockDomain
func (*MockDomainMockRecorder) Create ¶
func (mr *MockDomainMockRecorder) Create(domain interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockDomainMockRecorder) Delete ¶
func (mr *MockDomainMockRecorder) Delete(domainKey, checksum interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockDomainMockRecorder) Get ¶
func (mr *MockDomainMockRecorder) Get(domainKey interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockDomainMockRecorder) Index ¶
func (mr *MockDomainMockRecorder) Index(filters ...interface{}) *gomock.Call
Index indicates an expected call of Index
func (*MockDomainMockRecorder) Modify ¶
func (mr *MockDomainMockRecorder) Modify(domain interface{}) *gomock.Call
Modify indicates an expected call of Modify
type MockHistory ¶
type MockHistory struct {
// contains filtered or unexported fields
}
MockHistory is a mock of History interface
func NewMockHistory ¶
func NewMockHistory(ctrl *gomock.Controller) *MockHistory
NewMockHistory creates a new mock instance
func (*MockHistory) ClusterGraph ¶
func (m *MockHistory) ClusterGraph(clusterKey api.ClusterKey, start, stop time.Time) ([]api.ChangeDescription, error)
ClusterGraph mocks base method
func (*MockHistory) DomainGraph ¶
func (m *MockHistory) DomainGraph(domainKey api.DomainKey, start, stop time.Time) ([]api.ChangeDescription, error)
DomainGraph mocks base method
func (*MockHistory) EXPECT ¶
func (m *MockHistory) EXPECT() *MockHistoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockHistory) Index ¶
func (m *MockHistory) Index(filters changelog.FilterExpr, start, end time.Time) ([]api.ChangeDescription, error)
Index mocks base method
func (*MockHistory) RouteGraph ¶
func (m *MockHistory) RouteGraph(routeKey api.RouteKey, start, stop time.Time) ([]api.ChangeDescription, error)
RouteGraph mocks base method
func (*MockHistory) SharedRulesGraph ¶
func (m *MockHistory) SharedRulesGraph(sharedRulesKey api.SharedRulesKey, start, stop time.Time) ([]api.ChangeDescription, error)
SharedRulesGraph mocks base method
func (*MockHistory) Zone ¶
func (m *MockHistory) Zone(zoneKey api.ZoneKey, start, stop time.Time) ([]api.ChangeDescription, error)
Zone mocks base method
type MockHistoryMockRecorder ¶
type MockHistoryMockRecorder struct {
// contains filtered or unexported fields
}
MockHistoryMockRecorder is the mock recorder for MockHistory
func (*MockHistoryMockRecorder) ClusterGraph ¶
func (mr *MockHistoryMockRecorder) ClusterGraph(clusterKey, start, stop interface{}) *gomock.Call
ClusterGraph indicates an expected call of ClusterGraph
func (*MockHistoryMockRecorder) DomainGraph ¶
func (mr *MockHistoryMockRecorder) DomainGraph(domainKey, start, stop interface{}) *gomock.Call
DomainGraph indicates an expected call of DomainGraph
func (*MockHistoryMockRecorder) Index ¶
func (mr *MockHistoryMockRecorder) Index(filters, start, end interface{}) *gomock.Call
Index indicates an expected call of Index
func (*MockHistoryMockRecorder) RouteGraph ¶
func (mr *MockHistoryMockRecorder) RouteGraph(routeKey, start, stop interface{}) *gomock.Call
RouteGraph indicates an expected call of RouteGraph
func (*MockHistoryMockRecorder) SharedRulesGraph ¶
func (mr *MockHistoryMockRecorder) SharedRulesGraph(sharedRulesKey, start, stop interface{}) *gomock.Call
SharedRulesGraph indicates an expected call of SharedRulesGraph
func (*MockHistoryMockRecorder) Zone ¶
func (mr *MockHistoryMockRecorder) Zone(zoneKey, start, stop interface{}) *gomock.Call
Zone indicates an expected call of Zone
type MockListener ¶
type MockListener struct {
// contains filtered or unexported fields
}
MockListener is a mock of Listener interface
func NewMockListener ¶
func NewMockListener(ctrl *gomock.Controller) *MockListener
NewMockListener creates a new mock instance
func (*MockListener) Delete ¶
func (m *MockListener) Delete(listenerKey api.ListenerKey, checksum api.Checksum) error
Delete mocks base method
func (*MockListener) EXPECT ¶
func (m *MockListener) EXPECT() *MockListenerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockListener) Get ¶
func (m *MockListener) Get(listenerKey api.ListenerKey) (api.Listener, error)
Get mocks base method
func (*MockListener) Index ¶
func (m *MockListener) Index(filters ...ListenerFilter) (api.Listeners, error)
Index mocks base method
type MockListenerMockRecorder ¶
type MockListenerMockRecorder struct {
// contains filtered or unexported fields
}
MockListenerMockRecorder is the mock recorder for MockListener
func (*MockListenerMockRecorder) Create ¶
func (mr *MockListenerMockRecorder) Create(listener interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockListenerMockRecorder) Delete ¶
func (mr *MockListenerMockRecorder) Delete(listenerKey, checksum interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockListenerMockRecorder) Get ¶
func (mr *MockListenerMockRecorder) Get(listenerKey interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockListenerMockRecorder) Index ¶
func (mr *MockListenerMockRecorder) Index(filters ...interface{}) *gomock.Call
Index indicates an expected call of Index
func (*MockListenerMockRecorder) Modify ¶
func (mr *MockListenerMockRecorder) Modify(listener interface{}) *gomock.Call
Modify indicates an expected call of Modify
type MockOrg ¶
type MockOrg struct {
// contains filtered or unexported fields
}
MockOrg is a mock of Org interface
func NewMockOrg ¶
func NewMockOrg(ctrl *gomock.Controller) *MockOrg
NewMockOrg creates a new mock instance
func (*MockOrg) EXPECT ¶
func (m *MockOrg) EXPECT() *MockOrgMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockOrgMockRecorder ¶
type MockOrgMockRecorder struct {
// contains filtered or unexported fields
}
MockOrgMockRecorder is the mock recorder for MockOrg
func (*MockOrgMockRecorder) Create ¶
func (mr *MockOrgMockRecorder) Create(org interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockOrgMockRecorder) Delete ¶
func (mr *MockOrgMockRecorder) Delete(orgKey, checksum interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockOrgMockRecorder) Get ¶
func (mr *MockOrgMockRecorder) Get(orgKey interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockOrgMockRecorder) Index ¶
func (mr *MockOrgMockRecorder) Index(filters ...interface{}) *gomock.Call
Index indicates an expected call of Index
func (*MockOrgMockRecorder) Modify ¶
func (mr *MockOrgMockRecorder) Modify(org interface{}) *gomock.Call
Modify indicates an expected call of Modify
type MockProxy ¶
type MockProxy struct {
// contains filtered or unexported fields
}
MockProxy is a mock of Proxy interface
func NewMockProxy ¶
func NewMockProxy(ctrl *gomock.Controller) *MockProxy
NewMockProxy creates a new mock instance
func (*MockProxy) EXPECT ¶
func (m *MockProxy) EXPECT() *MockProxyMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockProxyMockRecorder ¶
type MockProxyMockRecorder struct {
// contains filtered or unexported fields
}
MockProxyMockRecorder is the mock recorder for MockProxy
func (*MockProxyMockRecorder) Create ¶
func (mr *MockProxyMockRecorder) Create(proxy interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockProxyMockRecorder) Delete ¶
func (mr *MockProxyMockRecorder) Delete(proxyKey, checksum interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockProxyMockRecorder) Get ¶
func (mr *MockProxyMockRecorder) Get(proxyKey interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockProxyMockRecorder) Index ¶
func (mr *MockProxyMockRecorder) Index(filters ...interface{}) *gomock.Call
Index indicates an expected call of Index
func (*MockProxyMockRecorder) Modify ¶
func (mr *MockProxyMockRecorder) Modify(proxy interface{}) *gomock.Call
Modify indicates an expected call of Modify
type MockProxyRef ¶
type MockProxyRef struct {
// contains filtered or unexported fields
}
MockProxyRef is a mock of ProxyRef interface
func NewMockProxyRef ¶
func NewMockProxyRef(ctrl *gomock.Controller) *MockProxyRef
NewMockProxyRef creates a new mock instance
func (*MockProxyRef) EXPECT ¶
func (m *MockProxyRef) EXPECT() *MockProxyRefMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockProxyRefMockRecorder ¶
type MockProxyRefMockRecorder struct {
// contains filtered or unexported fields
}
MockProxyRefMockRecorder is the mock recorder for MockProxyRef
func (*MockProxyRefMockRecorder) Get ¶
func (mr *MockProxyRefMockRecorder) Get(arg0 interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockProxyRefMockRecorder) MapKey ¶
func (mr *MockProxyRefMockRecorder) MapKey() *gomock.Call
MapKey indicates an expected call of MapKey
func (*MockProxyRefMockRecorder) Name ¶
func (mr *MockProxyRefMockRecorder) Name() *gomock.Call
Name indicates an expected call of Name
func (*MockProxyRefMockRecorder) ZoneRef ¶
func (mr *MockProxyRefMockRecorder) ZoneRef() *gomock.Call
ZoneRef indicates an expected call of ZoneRef
type MockRoute ¶
type MockRoute struct {
// contains filtered or unexported fields
}
MockRoute is a mock of Route interface
func NewMockRoute ¶
func NewMockRoute(ctrl *gomock.Controller) *MockRoute
NewMockRoute creates a new mock instance
func (*MockRoute) EXPECT ¶
func (m *MockRoute) EXPECT() *MockRouteMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockRouteMockRecorder ¶
type MockRouteMockRecorder struct {
// contains filtered or unexported fields
}
MockRouteMockRecorder is the mock recorder for MockRoute
func (*MockRouteMockRecorder) Create ¶
func (mr *MockRouteMockRecorder) Create(route interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockRouteMockRecorder) Delete ¶
func (mr *MockRouteMockRecorder) Delete(routeKey, checksum interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockRouteMockRecorder) Get ¶
func (mr *MockRouteMockRecorder) Get(routeKey interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockRouteMockRecorder) Index ¶
func (mr *MockRouteMockRecorder) Index(filters ...interface{}) *gomock.Call
Index indicates an expected call of Index
func (*MockRouteMockRecorder) Modify ¶
func (mr *MockRouteMockRecorder) Modify(route interface{}) *gomock.Call
Modify indicates an expected call of Modify
type MockSharedRules ¶
type MockSharedRules struct {
// contains filtered or unexported fields
}
MockSharedRules is a mock of SharedRules interface
func NewMockSharedRules ¶
func NewMockSharedRules(ctrl *gomock.Controller) *MockSharedRules
NewMockSharedRules creates a new mock instance
func (*MockSharedRules) Create ¶
func (m *MockSharedRules) Create(route api.SharedRules) (api.SharedRules, error)
Create mocks base method
func (*MockSharedRules) Delete ¶
func (m *MockSharedRules) Delete(sharedRulesKey api.SharedRulesKey, checksum api.Checksum) error
Delete mocks base method
func (*MockSharedRules) EXPECT ¶
func (m *MockSharedRules) EXPECT() *MockSharedRulesMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSharedRules) Get ¶
func (m *MockSharedRules) Get(sharedRulesKey api.SharedRulesKey) (api.SharedRules, error)
Get mocks base method
func (*MockSharedRules) Index ¶
func (m *MockSharedRules) Index(filters ...SharedRulesFilter) (api.SharedRulesSlice, error)
Index mocks base method
func (*MockSharedRules) Modify ¶
func (m *MockSharedRules) Modify(route api.SharedRules) (api.SharedRules, error)
Modify mocks base method
type MockSharedRulesMockRecorder ¶
type MockSharedRulesMockRecorder struct {
// contains filtered or unexported fields
}
MockSharedRulesMockRecorder is the mock recorder for MockSharedRules
func (*MockSharedRulesMockRecorder) Create ¶
func (mr *MockSharedRulesMockRecorder) Create(route interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockSharedRulesMockRecorder) Delete ¶
func (mr *MockSharedRulesMockRecorder) Delete(sharedRulesKey, checksum interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockSharedRulesMockRecorder) Get ¶
func (mr *MockSharedRulesMockRecorder) Get(sharedRulesKey interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockSharedRulesMockRecorder) Index ¶
func (mr *MockSharedRulesMockRecorder) Index(filters ...interface{}) *gomock.Call
Index indicates an expected call of Index
func (*MockSharedRulesMockRecorder) Modify ¶
func (mr *MockSharedRulesMockRecorder) Modify(route interface{}) *gomock.Call
Modify indicates an expected call of Modify
type MockUser ¶
type MockUser struct {
// contains filtered or unexported fields
}
MockUser is a mock of User interface
func NewMockUser ¶
func NewMockUser(ctrl *gomock.Controller) *MockUser
NewMockUser creates a new mock instance
func (*MockUser) EXPECT ¶
func (m *MockUser) EXPECT() *MockUserMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockUserMockRecorder ¶
type MockUserMockRecorder struct {
// contains filtered or unexported fields
}
MockUserMockRecorder is the mock recorder for MockUser
func (*MockUserMockRecorder) Create ¶
func (mr *MockUserMockRecorder) Create(user interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockUserMockRecorder) Delete ¶
func (mr *MockUserMockRecorder) Delete(userKey, checksum interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockUserMockRecorder) Get ¶
func (mr *MockUserMockRecorder) Get(userKey interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockUserMockRecorder) Index ¶
func (mr *MockUserMockRecorder) Index(filters ...interface{}) *gomock.Call
Index indicates an expected call of Index
func (*MockUserMockRecorder) Modify ¶
func (mr *MockUserMockRecorder) Modify(user interface{}) *gomock.Call
Modify indicates an expected call of Modify
type MockZone ¶
type MockZone struct {
// contains filtered or unexported fields
}
MockZone is a mock of Zone interface
func NewMockZone ¶
func NewMockZone(ctrl *gomock.Controller) *MockZone
NewMockZone creates a new mock instance
func (*MockZone) EXPECT ¶
func (m *MockZone) EXPECT() *MockZoneMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockZoneMockRecorder ¶
type MockZoneMockRecorder struct {
// contains filtered or unexported fields
}
MockZoneMockRecorder is the mock recorder for MockZone
func (*MockZoneMockRecorder) Create ¶
func (mr *MockZoneMockRecorder) Create(zone interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockZoneMockRecorder) Delete ¶
func (mr *MockZoneMockRecorder) Delete(zoneKey, checksum interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockZoneMockRecorder) Get ¶
func (mr *MockZoneMockRecorder) Get(zoneKey interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockZoneMockRecorder) Index ¶
func (mr *MockZoneMockRecorder) Index(filters ...interface{}) *gomock.Call
Index indicates an expected call of Index
func (*MockZoneMockRecorder) Modify ¶
func (mr *MockZoneMockRecorder) Modify(zone interface{}) *gomock.Call
Modify indicates an expected call of Modify
type MockZoneRef ¶
type MockZoneRef struct {
// contains filtered or unexported fields
}
MockZoneRef is a mock of ZoneRef interface
func NewMockZoneRef ¶
func NewMockZoneRef(ctrl *gomock.Controller) *MockZoneRef
NewMockZoneRef creates a new mock instance
func (*MockZoneRef) EXPECT ¶
func (m *MockZoneRef) EXPECT() *MockZoneRefMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockZoneRefMockRecorder ¶
type MockZoneRefMockRecorder struct {
// contains filtered or unexported fields
}
MockZoneRefMockRecorder is the mock recorder for MockZoneRef
func (*MockZoneRefMockRecorder) Get ¶
func (mr *MockZoneRefMockRecorder) Get(arg0 interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockZoneRefMockRecorder) Name ¶
func (mr *MockZoneRefMockRecorder) Name() *gomock.Call
Name indicates an expected call of Name
type Org ¶
type Org interface {
// GET /v1.0/admin/org
//
// Index returns all Orgs to which the given filters apply. All non-empty
// fields in a filter must apply for the filter to apply. Any Org to which
// any filter applies is included in the result.
//
// If no filters are supplied, all Orgs are returned.
Index(filters ...OrgFilter) (api.Orgs, error)
// GET /v1.0/admin/org/<string:orgKey>[?include_deleted]
//
// Get returns an Org for the given OrgKey. If the Org does not
// exist, an error is returned.
Get(orgKey api.OrgKey) (api.Org, error)
// POST /v1.0/admin/org
//
// Create creates the given Org. Org Names must be unique for a given
// ZoneKey. If a OrgKey is specified in the Org, it is ignored and
// replaced in the result with the authoritative OrgKey.
Create(org api.Org) (api.Org, error)
// PUT /v1.0/admin/org/<string:orgKey>
//
// Modify modifies the given Org. Org Names must be unique for a given
// ZoneKey. The given Org Checksum must match the existing Checksum.
Modify(org api.Org) (api.Org, error)
// DELETE /v1.0/admin/org/<string:orgKey>?checksum=<checksum>
//
// Delete completely removes the Org data from the database.
// If the checksum does not match no action is taken and an error
// is returned.
Delete(orgKey api.OrgKey, checksum api.Checksum) error
}
type OrgFilter ¶
type Proxy ¶
type Proxy interface {
// GET /v1.0/proxies
//
// Index returns all Proxies to which the given filters apply. All non-empty
// fields in a filter must apply for the filter to apply. Any Proxy to which
// any filter applies is included in the result.
//
// If no filters are supplied, all Proxies are returned.
Index(filters ...ProxyFilter) (api.Proxies, error)
// GET /v1.0/proxies/<string:proxyKey>[?include_deleted]
//
// Get returns a Proxy for the given ProxyKey. If the Proxy does not
// exist, an error is returned.
Get(proxyKey api.ProxyKey) (api.Proxy, error)
// POST /v1.0/proxies
//
// Create creates the given Proxy. The tuple of (Host, Port, ZoneKey) must be
// unique. If a ProxyKey is specified in the Proxy, it is ignored and
// replaced in the result with the authoritative ProxyKey.
Create(proxy api.Proxy) (api.Proxy, error)
// PUT /v1.0/proxies/<string:proxyKey>
//
// Modify Modifies the given Proxy. The tuple of (Host, Port, ZoneKey) must be
// unique. The given Proxy Checksum must match the existing Checksum.
Modify(proxy api.Proxy) (api.Proxy, error)
// DELETE /v1.0/proxies/<string:proxyKey>?checksum=<string:checksum>
//
// Delete completely removes the Proxy from the database.
// If the checksum does not match no action is taken and an error
// is returned.
Delete(proxyKey api.ProxyKey, checksum api.Checksum) error
}
Proxy describes the CRUD interface for api.Proxy
type ProxyFilter ¶
type ProxyFilter struct {
ProxyKey api.ProxyKey `json:"proxy_key"`
Name string `json:"name"`
// DomainKeys matches Proxies with a superset of the specified DomainKeys. A
// slice with a single value of "-" will produce Proxies with no linked
// Domains.
DomainKeys []api.DomainKey `json:"domain_keys"`
// ListenerKeys matches Proxies with a superset of the specified ListenerKeys. A
// slice with a single value of "-" will produce Proxies with no linked
// Listeners.
ListenerKeys []api.ListenerKey `json:"listener_keys"`
ZoneKey api.ZoneKey `json:"zone_key"`
OrgKey api.OrgKey `json:"org_key"`
}
ProxyFilter describes a filter on the full list of Proxies
func (ProxyFilter) Equals ¶
func (pf ProxyFilter) Equals(o ProxyFilter) bool
Equals returns true if the target is equal to the receiver
func (ProxyFilter) HasNoDomains ¶
func (pf ProxyFilter) HasNoDomains() bool
HasNoDomains returns true if DomainKeys has been set to the monitor value indicating a filter for Proxies with no linked Domains.
func (ProxyFilter) HasNoListeners ¶
func (pf ProxyFilter) HasNoListeners() bool
HasNoListeners returns true if ListenerKeys has been set to the monitor value indicating a filter for Proxies with no linked Listeners.
func (ProxyFilter) IsNil ¶
func (pf ProxyFilter) IsNil() bool
IsNil returns true if the receiver is the zero value
type ProxyRef ¶
type ProxyRef interface {
// Get returns the Proxy corresponding to the ProxyRef. The lookup is memoized.
Get(All) (api.Proxy, error)
Name() string
ZoneRef() ZoneRef
// MapKey returns a string suitable for keying the ProxyRef
// in a map. ProxyRefs with the same MapKey refer to the same
// Proxy.
MapKey() string
}
ProxyRef encapsulates a lookup of a Proxy by Name and Zone Name
func NewProxyNameProxyRef ¶
NewProxyNameProxyRef returns a ProxyRef keyed by the given api.Proxy name and ZoneRef
func NewProxyRef ¶
NewProxyRef produces a ProxyRef from an api.Proxy and an api.Zone
func NewProxyRefFromMapKey ¶
NewProxyRefFromMapKey returns a ProxyRef keyed by the given map key
type Route ¶
type Route interface {
// GET /v1.0/routes/<string:routeKey>
//
// Index returns all Routes to which the given filters apply. All non-empty
// fields in a filter must apply for the filter to apply. Any Route to which
// any filter applies is included in the result.
//
// If no filters are supplied, all Routes are returned.
Index(filters ...RouteFilter) (api.Routes, error)
// GET /v1.0/routes/<string:routeKey>[?include_deleted]
//
// Get returns a Route for the given RouteKey. If the Route does not
// exist, an error is returned.
Get(routeKey api.RouteKey) (api.Route, error)
// POST /v1.0/routes
//
// Create creates the given Route. The Path must be unique for a given
// ZoneKey. If a RouteKey is specified in the Route, it is ignored
// and replaced in the result with the authoritative RouteKey.
Create(route api.Route) (api.Route, error)
// PUT /v1.0/routes/string:routeKey>
//
// Modify modifies the given Route. The Path must be unique for a given
// ZoneKey. The given Route Checksum must match the existing Checksum.
Modify(route api.Route) (api.Route, error)
// DELETE /v1.0/routes/<string:routeKey>?checksum=<string:checksum>
//
// Delete completely removes the Route from the database.
// If the checksum does not match no action is taken and an error
// is returned.
Delete(routeKey api.RouteKey, checksum api.Checksum) error
}
Route describes the CRUD interface for api.Routes
type RouteFilter ¶
type RouteFilter struct {
RouteKey api.RouteKey `json:"route_key"`
DomainKey api.DomainKey `json:"domain_key"`
Path string `json:"path"`
PathPrefix string `json:"path_prefix"`
ZoneKey api.ZoneKey `json:"zone_key"`
OrgKey api.OrgKey `json:"org_key"`
}
RouteFilter describes a filter on the full list of Routes
func (RouteFilter) Equals ¶
func (rf RouteFilter) Equals(o RouteFilter) bool
Equals returns true if the target is equal to the receiver
func (RouteFilter) IsNil ¶
func (rf RouteFilter) IsNil() bool
IsNil returns true if the receiver is the zero value
type SharedRules ¶
type SharedRules interface {
//
// Index returns all SharedRules to which the given filters apply. All non-empty
// fields in a filter must apply for the filter to apply. Any SharedRules to which
// any filter applies is included in the result.
//
// If no filters are supplied, all SharedRules are returned.
Index(filters ...SharedRulesFilter) (api.SharedRulesSlice, error)
//
// Get returns a SharedRules for the given SharedRulesKey. If the SharedRules does not
// exist, an error is returned.
Get(sharedRulesKey api.SharedRulesKey) (api.SharedRules, error)
//
// Create creates the given SharedRules. The Path must be unique for a given
// ZoneKey. If a SharedRulesKey is specified in the SharedRules, it is ignored
// and replaced in the result with the authoritative SharedRulesKey.
Create(route api.SharedRules) (api.SharedRules, error)
//
// Modify modifies the given SharedRules. The Path must be unique for a given
// ZoneKey. The given SharedRules Checksum must match the existing Checksum.
Modify(route api.SharedRules) (api.SharedRules, error)
//
// Delete completely removes the SharedRules from the database.
// If the checksum does not match no action is taken and an error
// is returned.
Delete(sharedRulesKey api.SharedRulesKey, checksum api.Checksum) error
}
SharedRules describes the CRUD interface for api.SharedRules
type SharedRulesFilter ¶
type SharedRulesFilter struct {
}
SharedRulesFilter describes a filter on the full list of SharedRules
func (SharedRulesFilter) Equals ¶
func (rf SharedRulesFilter) Equals(o SharedRulesFilter) bool
Equals returns true if the target is equal to the receiver
func (SharedRulesFilter) IsNil ¶
func (rf SharedRulesFilter) IsNil() bool
IsNil returns true if the receiver is the zero value
type User ¶
type User interface {
// GET /v1.0/admin/user
//
// Index returns all Users to which the given filters apply. All non-empty
// fields in a filter must apply for the filter to apply. Any User to which
// any filter applies is included in the result.
//
// If no filters are supplied, all Users are returned.
Index(filters ...UserFilter) (api.Users, error)
// GET /v1.0/admin/user/<string:userKey>[?include_deleted]
//
// Get returns a User for the given UserKey. If the User does not
// exist, an error is returned.
Get(userKey api.UserKey) (api.User, error)
// POST /v1.0/admin/user
//
// Create creates the given User. User Names must be unique for a given
// ZoneKey. If a UserKey is specified in the User, it is ignored and
// replaced in the result with the authoritative UserKey.
Create(user api.User) (api.User, error)
// PUT /v1.0/admin/user/<string:userKey>
//
// Modify modifies the given User. User Names must be unique for a given
// ZoneKey. The given User Checksum must match the existing Checksum.
Modify(user api.User) (api.User, error)
// DELETE /v1.0/admin/user/<string:userKey>?checksum=<string:checksum>
//
// Delete marks the User corresponding to the given UserKey as deleted.
// The given User Checksum must match the existing Checksum. The
// timestamp of the DB operation is used as a deletion time.
Delete(userKey api.UserKey, checksum api.Checksum) error
}
type UserFilter ¶
type UserFilter struct {
UserKey api.UserKey `json:"user_key"`
LoginEmail string `json:"login_email"`
APIAuthKey api.APIAuthKey `json:"api_auth_key"`
OrgKey api.OrgKey `json:"org_key"`
Active *bool `json:"active"`
DeletedBefore *time.Time `json:"deleted_before"`
DeletedAfter *time.Time `json:"deleted_after"`
}
func (UserFilter) Equals ¶
func (uf UserFilter) Equals(o UserFilter) bool
func (UserFilter) IsNil ¶
func (uf UserFilter) IsNil() bool
type Zone ¶
type Zone interface {
// GET /v1.0/admin/zone
//
// Index returns all Zones to which the given filters apply. All non-empty
// fields in a filter must apply for the filter to apply. Any Zone to which
// any filter applies is included in the result.
//
// If no filters are supplied, all Zones are returned.
Index(filters ...ZoneFilter) (api.Zones, error)
// GET /v1.0/admin/zone/<string:zoneKey>[?include_deleted]
//
// Get returns a Zone for the given ZoneKey. If the Zone does not
// exist, an error is returned.
Get(zoneKey api.ZoneKey) (api.Zone, error)
// POST /v1.0/admin/zone
//
// Create creates the given Zone. Zone Names must be unique for a given
// ZoneKey. If a ZoneKey is specified in the Zone, it is ignored and
// replaced in the result with the authoritative ZoneKey.
Create(zone api.Zone) (api.Zone, error)
// PUT /v1.0/admin/zone/<string:zoneKey>
//
// Modify modifies the given Zone. Zone Names must be unique for a given
// ZoneKey. The given Zone Checksum must match the existing Checksum.
Modify(zone api.Zone) (api.Zone, error)
// DELETE /v1.0/admin/zone/<string:zoneKey>?checksum=<string:checksum>
//
// Delete completely removes the Zone data from the database.
// If the checksum does not match no action is taken and an error
// is returned.
Delete(zoneKey api.ZoneKey, checksum api.Checksum) error
}
Zone describes the CRUD interface for api.Zones
type ZoneFilter ¶
type ZoneFilter struct {
ZoneKey api.ZoneKey `json:"zone_key"`
Name string `json:"name"`
OrgKey api.OrgKey `json:"org_key"`
}
ZoneFilter describes a filter on the full list of Zones
func (ZoneFilter) Equals ¶
func (z ZoneFilter) Equals(o ZoneFilter) bool
Equals returns true if the target is equal to the receiver
func (ZoneFilter) IsNil ¶
func (z ZoneFilter) IsNil() bool
IsNil returns true if the receiver is the zero value
type ZoneRef ¶
type ZoneRef interface {
// Get returns the Zone corresponding to the ZoneRef. The lookup is memoized.
Get(All) (api.Zone, error)
Name() string
}
ZoneRef encapsulates a lookup of a Zone by Name
func NewZoneNameZoneRef ¶
NewZoneNameZoneRef produces a ZoneRef from an api.Zone name
func NewZoneRef ¶
NewZoneRef produces a ZoneRef from an api.Zone
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package changelog includes the filter definition necessary to make adhoc queries against the object audit history that we track.
|
Package changelog includes the filter definition necessary to make adhoc queries against the object audit history that we track. |
|
v1/querytype
Package querytype defines the QueryType enumeration.
|
Package querytype defines the QueryType enumeration. |
|
v1/timegranularity
Package timegranularity defines the TimeGranularity enumeration.
|
Package timegranularity defines the TimeGranularity enumeration. |
|
v2
Package v2 defines the interfaces representing the portion of the Turbine Labs public API prefixed by /v2.0/stats.
|
Package v2 defines the interfaces representing the portion of the Turbine Labs public API prefixed by /v2.0/stats. |
|
v2/querytype
Package querytype defines the QueryType enumeration.
|
Package querytype defines the QueryType enumeration. |
|
v2/timegranularity
Package timegranularity defines the TimeGranularity enumeration.
|
Package timegranularity defines the TimeGranularity enumeration. |