services

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2020 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowedURI

type AllowedURI struct {
	ID       int64  `json:"id"`
	URI      string `json:"uri"`
	ClientID int64  `json:"clientId"`
}

AllowedURI AllowedURI

type AllowedURIResponse

type AllowedURIResponse struct {
	Success bool  `json:"success"`
	ID      int64 `json:"id"`
	Code    int   `json:"code"`
}

AllowedURIResponse resp

type AllowedURIService

type AllowedURIService struct {
	Token    string
	ClientID string
	APIKey   string
	UserID   string
	Hashed   string
	Host     string
}

AllowedURIService service

func (*AllowedURIService) AddAllowedURI

func (a *AllowedURIService) AddAllowedURI(au *AllowedURI) *AllowedURIResponse

AddAllowedURI add

func (*AllowedURIService) DeleteAllowedURI

func (a *AllowedURIService) DeleteAllowedURI(id string) *AllowedURIResponse

DeleteAllowedURI delete DeleteAllowedURI

func (*AllowedURIService) GetAllowedURI

func (a *AllowedURIService) GetAllowedURI(id string) *AllowedURI

GetAllowedURI get GetAllowedURI

func (*AllowedURIService) GetAllowedURIList

func (a *AllowedURIService) GetAllowedURIList(clientID string) *[]AllowedURI

GetAllowedURIList get GetAllowedURIList list

func (*AllowedURIService) UpdateAllowedURI

func (a *AllowedURIService) UpdateAllowedURI(au *AllowedURI) *AllowedURIResponse

UpdateAllowedURI update UpdateAllowedURI

type Client

type Client struct {
	ClientID     int64         `json:"clientId"`
	Secret       string        `json:"secret"`
	Name         string        `json:"name"`
	WebSite      string        `json:"webSite"`
	Email        string        `json:"email"`
	Enabled      bool          `json:"enabled"`
	Paid         bool          `json:"paid"`
	RedirectURIs []RedirectURI `json:"redirectUrls"`
}

Client client

type ClientResponse

type ClientResponse struct {
	Success  bool  `json:"success"`
	ClientID int64 `json:"clientId"`
	Code     int   `json:"code"`
}

ClientResponse resp

type ClientRole

type ClientRole struct {
	ID       int64  `json:"id"`
	ClientID int64  `json:"clientId"`
	Role     string `json:"role"`
}

ClientRole ClientRole

type ClientRoleResponse

type ClientRoleResponse struct {
	Success bool  `json:"success"`
	ID      int64 `json:"id"`
	Code    int   `json:"code"`
}

ClientRoleResponse resp

type ClientRoleService

type ClientRoleService struct {
	Token    string
	ClientID string
	APIKey   string
	UserID   string
	Hashed   string
	Host     string
}

ClientRoleService ClientRoleService

func (*ClientRoleService) AddClientRole

func (r *ClientRoleService) AddClientRole(cr *ClientRole) *ClientRoleResponse

AddClientRole AddClientRole

func (*ClientRoleService) DeleteClientRole

func (r *ClientRoleService) DeleteClientRole(id string) *ClientRoleResponse

DeleteClientRole delete DeleteClientRole

func (*ClientRoleService) GetClientRoleList

func (r *ClientRoleService) GetClientRoleList(clientID string) *[]ClientRole

GetClientRoleList get GetClientRoleList list

type ClientService

type ClientService struct {
	Token    string
	ClientID string
	APIKey   string
	UserID   string
	Hashed   string
	Host     string
}

ClientService service

func (*ClientService) AddClient

func (c *ClientService) AddClient(client *Client) *ClientResponse

AddClient add template

func (*ClientService) DeleteClient

func (c *ClientService) DeleteClient(id string) *ClientResponse

DeleteClient delete DeleteClient

func (*ClientService) GetClient

func (c *ClientService) GetClient(clientID string) *Client

GetClient get GetClient

func (*ClientService) GetClientList

func (c *ClientService) GetClientList() *[]Client

GetClientList get client list

func (*ClientService) SearchClient

func (c *ClientService) SearchClient(client *Client) *[]Client

SearchClient SearchClient

func (*ClientService) UpdateClient

func (c *ClientService) UpdateClient(client *Client) *ClientResponse

UpdateClient update UpdateClient

type GatewayBreaker

type GatewayBreaker struct {
	ID                     int64     `json:"id"`
	FailureThreshold       int       `json:"failureThreshold"`
	FailureCount           int       `json:"failureCount"`
	LastFailureTime        time.Time `json:"lastFailureTime"`
	HealthCheckTimeSeconds int       `json:"healthCheckTimeSeconds"`
	FailoverRouteName      string    `json:"failoverRouteName"`
	OpenFailCode           int       `json:"openFailCode"`
	RouteURIID             int64     `json:"routeUriId"`
	RestRouteID            int64     `json:"routeId"`
	ClientID               int64     `json:"clientId"`
}

GatewayBreaker GatewayClient

type GatewayBreakerService

type GatewayBreakerService struct {
	Token    string
	ClientID string
	APIKey   string
	UserID   string
	Hashed   string
	Host     string
}

GatewayBreakerService service

func (*GatewayBreakerService) DeleteBreaker

func (r *GatewayBreakerService) DeleteBreaker(urlID string, routeID string, clientID string) *GatewayResponse

DeleteBreaker delete

func (*GatewayBreakerService) GetBreaker

func (r *GatewayBreakerService) GetBreaker(urlID string, routeID string, clientID string) *GatewayBreaker

GetBreaker get

func (*GatewayBreakerService) GetBreakerStatus

func (r *GatewayBreakerService) GetBreakerStatus(routeURLID string, clientID string) *Status

GetBreakerStatus get

func (*GatewayBreakerService) InsertBreaker

func (r *GatewayBreakerService) InsertBreaker(bk *GatewayBreaker) *GatewayResponse

InsertBreaker add

func (*GatewayBreakerService) ResetBreaker

ResetBreaker update

func (*GatewayBreakerService) UpdateBreaker

func (r *GatewayBreakerService) UpdateBreaker(bk *GatewayBreaker) *GatewayResponse

UpdateBreaker update

type GatewayClient

type GatewayClient struct {
	ClientID int64  `json:"clientId"`
	APIKey   string `json:"apiKey"`
	Enabled  bool   `json:"enabled"`
	Level    string `json:"level"`
	Paid     bool   `json:"paid"`
}

GatewayClient GatewayClient

type GatewayClientService

type GatewayClientService struct {
	Token    string
	ClientID string
	APIKey   string
	UserID   string
	Hashed   string
	Host     string
}

GatewayClientService service

func (*GatewayClientService) AddClient

func (c *GatewayClientService) AddClient(client *GatewayClient) *GatewayResponse

AddClient add template

func (*GatewayClientService) DeleteClient

func (c *GatewayClientService) DeleteClient(id string) *GatewayResponse

DeleteClient delete DeleteClient

func (*GatewayClientService) GetClient

func (c *GatewayClientService) GetClient(clientID string) *GatewayClient

GetClient get GetClient

func (*GatewayClientService) GetClientList

func (c *GatewayClientService) GetClientList() *[]GatewayClient

GetClientList get client list

func (*GatewayClientService) UpdateClient

func (c *GatewayClientService) UpdateClient(client *GatewayClient) *GatewayResponse

UpdateClient update UpdateClient

type GatewayError

type GatewayError struct {
	ID          int64     `json:"id"`
	Code        int       `json:"code"`
	Message     string    `json:"message"`
	Entered     time.Time `json:"entered"`
	RouteURIID  int64     `json:"routeUriId"`
	RestRouteID int64     `json:"routeId"`
	ClientID    int64     `json:"clientId"`
}

GatewayError GatewayError

type GatewayErrorsService

type GatewayErrorsService struct {
	Token    string
	ClientID string
	APIKey   string
	UserID   string
	Hashed   string
	Host     string
}

GatewayErrorsService service

func (*GatewayErrorsService) GetRouteErrors

func (e *GatewayErrorsService) GetRouteErrors(ee *GatewayError) *[]GatewayError

GetRouteErrors GetRouteErrors

type GatewayPerformance

type GatewayPerformance struct {
	ID             int64     `json:"id"`
	Calls          int64     `json:"calls"`
	LatencyMsTotal int64     `json:"latencyMsTotal"`
	Entered        time.Time `json:"entered"`
	RouteURIID     int64     `json:"routeUriId"`
	RestRouteID    int64     `json:"routeId"`
	ClientID       int64     `json:"clientId"`
}

GatewayPerformance GatewayPerformance

type GatewayPerformanceService

type GatewayPerformanceService struct {
	Token    string
	ClientID string
	APIKey   string
	UserID   string
	Hashed   string
	Host     string
}

GatewayPerformanceService service

func (*GatewayPerformanceService) GetRoutePerformance

func (p *GatewayPerformanceService) GetRoutePerformance(pp *GatewayPerformance) *[]GatewayPerformance

GetRoutePerformance GetRoutePerformance

type GatewayResponse

type GatewayResponse struct {
	Success bool  `json:"success"`
	ID      int64 `json:"id"`
	Code    int   `json:"code"`
}

GatewayResponse resp

type GatewayRoute

type GatewayRoute struct {
	ID       int64  `json:"id"`
	ClientID int64  `json:"clientId"`
	Route    string `json:"route"`
}

GatewayRoute GatewayClient

type GatewayRouteService

type GatewayRouteService struct {
	Token    string
	ClientID string
	APIKey   string
	UserID   string
	Hashed   string
	Host     string
}

GatewayRouteService service

func (*GatewayRouteService) AddRoute

func (r *GatewayRouteService) AddRoute(route *GatewayRoute) *GatewayResponse

AddRoute add

func (*GatewayRouteService) DeleteRoute

func (r *GatewayRouteService) DeleteRoute(routeID string, clientID string) *GatewayResponse

DeleteRoute delete

func (*GatewayRouteService) GetRoute

func (r *GatewayRouteService) GetRoute(routeID string, clientID string) *GatewayRoute

GetRoute get

func (*GatewayRouteService) GetRouteList

func (r *GatewayRouteService) GetRouteList(clientID string) *[]GatewayRoute

GetRouteList get

func (*GatewayRouteService) UpdateRoute

func (r *GatewayRouteService) UpdateRoute(route *GatewayRoute) *GatewayResponse

UpdateRoute update

type GatewayRouteURL

type GatewayRouteURL struct {
	ID       int64  `json:"id"`
	RouteID  int64  `json:"routeId"`
	ClientID int64  `json:"clientId"`
	Name     string `json:"name"`
	URL      string `json:"url"`
	Active   bool   `json:"active"`
}

GatewayRouteURL GatewayClient

type GatewayRouteURLService

type GatewayRouteURLService struct {
	Token    string
	ClientID string
	APIKey   string
	UserID   string
	Hashed   string
	Host     string
}

GatewayRouteURLService service

func (*GatewayRouteURLService) ActivateRouteURL

func (r *GatewayRouteURLService) ActivateRouteURL(url *GatewayRouteURL) *GatewayResponse

ActivateRouteURL update

func (*GatewayRouteURLService) AddRouteURL

AddRouteURL add

func (*GatewayRouteURLService) DeleteRouteURL

func (r *GatewayRouteURLService) DeleteRouteURL(id string, routeID string, clientID string) *GatewayResponse

DeleteRouteURL delete

func (*GatewayRouteURLService) GetRouteURL

func (r *GatewayRouteURLService) GetRouteURL(id string, routeID string, clientID string) *GatewayRouteURL

GetRouteURL get

func (*GatewayRouteURLService) GetRouteURLList

func (r *GatewayRouteURLService) GetRouteURLList(routeID string, clientID string) *[]GatewayRouteURL

GetRouteURLList get

func (*GatewayRouteURLService) UpdateRouteURL

func (r *GatewayRouteURLService) UpdateRouteURL(url *GatewayRouteURL) *GatewayResponse

UpdateRouteURL update

type GrantType

type GrantType struct {
	ID        int64  `json:"id"`
	ClientID  int64  `json:"clientId"`
	GrantType string `json:"grantType"`
}

GrantType GrantType

type GrantTypeResponse

type GrantTypeResponse struct {
	Success bool  `json:"success"`
	ID      int64 `json:"id"`
	Code    int   `json:"code"`
}

GrantTypeResponse resp

type GrantTypeService

type GrantTypeService struct {
	Token    string
	ClientID string
	APIKey   string
	UserID   string
	Hashed   string
	Host     string
}

GrantTypeService GrantTypeService

func (*GrantTypeService) AddGrantType

func (g *GrantTypeService) AddGrantType(rd *GrantType) *GrantTypeResponse

AddGrantType AddGrantType

func (*GrantTypeService) DeleteGrantType

func (g *GrantTypeService) DeleteGrantType(id string) *GrantTypeResponse

DeleteGrantType delete DeleteGrantType

func (*GrantTypeService) GetGrantTypeList

func (g *GrantTypeService) GetGrantTypeList(clientID string) *[]GrantType

GetGrantTypeList get GetGrantTypeList list

type RedirectURI

type RedirectURI struct {
	ID       int64  `json:"id"`
	ClientID int64  `json:"clientId"`
	URI      string `json:"uri"`
}

RedirectURI RedirectURI

type RedirectURIResponse

type RedirectURIResponse struct {
	Success bool  `json:"success"`
	ID      int64 `json:"id"`
	Code    int   `json:"code"`
}

RedirectURIResponse resp

type RedirectURIService

type RedirectURIService struct {
	Token    string
	ClientID string
	APIKey   string
	UserID   string
	Hashed   string
	Host     string
}

RedirectURIService RedirectURIService

func (*RedirectURIService) AddRedirectURI

func (r *RedirectURIService) AddRedirectURI(rd *RedirectURI) *RedirectURIResponse

AddRedirectURI AddRedirectURI

func (*RedirectURIService) DeleteRedirectURI

func (r *RedirectURIService) DeleteRedirectURI(id string) *RedirectURIResponse

DeleteRedirectURI delete DeleteRedirectURI

func (*RedirectURIService) GetRedirectURIList

func (r *RedirectURIService) GetRedirectURIList(clientID string) *[]RedirectURI

GetRedirectURIList get GetRedirectURIList list

type Role

type Role struct {
	ID   int64  `json:"id"`
	Role string `json:"role"`
}

Role user role

type RoleURI

type RoleURI struct {
	ClientRoleID       int64 `json:"clientRoleId"`
	ClientAllowedURIID int64 `json:"clientAllowedUriId"`
}

RoleURI RoleURI

type RoleURIResponse

type RoleURIResponse struct {
	Success bool `json:"success"`
	Code    int  `json:"code"`
}

RoleURIResponse resp

type RoleURIService

type RoleURIService struct {
	Token    string
	ClientID string
	APIKey   string
	UserID   string
	Hashed   string
	Host     string
}

RoleURIService service

func (*RoleURIService) AddRoleURI

func (r *RoleURIService) AddRoleURI(ru *RoleURI) *RoleURIResponse

AddRoleURI add

func (*RoleURIService) DeleteRoleURI

func (r *RoleURIService) DeleteRoleURI(ru *RoleURI) *RoleURIResponse

DeleteRoleURI add

func (*RoleURIService) GetRoleURIList

func (r *RoleURIService) GetRoleURIList(uID string) *[]RoleURI

GetRoleURIList get GetRoleURIList list

type Status

type Status struct {
	Warning           bool   `json:"warning"`
	Open              bool   `json:"open"`
	PartialOpen       bool   `json:"partialOpen"`
	FailoverRouteName string `json:"failoverRouteName"`
	OpenFailCode      int    `json:"openFailCode"`
}

Status status

type UpdateUser

type UpdateUser interface {
	GetType() string
}

UpdateUser interface

type User

type User struct {
	Username     string `json:"username"`
	Password     string `json:"password"`
	Enabled      bool   `json:"enabled"`
	EmailAddress string `json:"emailAddress"`
	FirstName    string `json:"firstName"`
	LastName     string `json:"lastName"`
	RoleID       int64  `json:"roleId"`
	ClientID     string `json:"clientId"`
}

User user

type UserDis

type UserDis struct {
	Username string `json:"username"`
	Enabled  bool   `json:"enabled"`
	ClientID string `json:"clientId"`
}

UserDis user

func (*UserDis) GetType

func (u *UserDis) GetType() string

GetType type

type UserInfo

type UserInfo struct {
	Username     string `json:"username"`
	EmailAddress string `json:"emailAddress"`
	FirstName    string `json:"firstName"`
	LastName     string `json:"lastName"`
	RoleID       int64  `json:"roleId"`
	ClientID     string `json:"clientId"`
}

UserInfo user

func (*UserInfo) GetType

func (u *UserInfo) GetType() string

GetType type

type UserPW

type UserPW struct {
	Username string `json:"username"`
	Password string `json:"password"`
	ClientID string `json:"clientId"`
}

UserPW user

func (*UserPW) GetType

func (u *UserPW) GetType() string

GetType type

type UserResponse

type UserResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
	Code    int    `json:"code"`
}

UserResponse resp

type UserService

type UserService struct {
	Token    string
	ClientID string
	APIKey   string
	UserID   string
	Hashed   string
	Host     string
}

UserService service

func (*UserService) AddUser

func (u *UserService) AddUser(user *User) *UserResponse

AddUser add

func (*UserService) DeleteUser

func (u *UserService) DeleteUser(username string, clientID string) *UserResponse

DeleteUser delete

func (*UserService) GetRoleList

func (u *UserService) GetRoleList() *[]Role

GetRoleList get role list

func (*UserService) GetUser

func (u *UserService) GetUser(username string, clientID string) *User

GetUser get

func (*UserService) GetUserList

func (u *UserService) GetUserList() *[]User

GetUserList get user list

func (*UserService) SearchUserList

func (u *UserService) SearchUserList(clientID string) *[]User

SearchUserList search by client

func (*UserService) UpdateUser

func (u *UserService) UpdateUser(user UpdateUser) *UserResponse

UpdateUser update

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL