Documentation ¶
Index ¶
- Variables
- type Channel
- type Customer
- type CustomerSearchResponse
- type EntitlementValues
- type GetCustomerResponse
- type HTTPClient
- type IReplicated
- type MockReplicated
- func (m MockReplicated) DownloadFromReplicated(url, requestId, authorization string) (res *http.Response, err error)
- func (m MockReplicated) GetDowloadUrl(customer Customer, requestId string) (url string, err error)
- func (m MockReplicated) SearchCustomersByEmail(email string, requestId string) (customers []Customer, err error)
- type ReplicatedImpl
- func (r ReplicatedImpl) DownloadFromReplicated(url, requestId, authorization string) (res *http.Response, err error)
- func (r *ReplicatedImpl) GetDowloadUrl(customer Customer, requestId string) (url string, err error)
- func (r ReplicatedImpl) SearchCustomersByEmail(email string, requestId string) (customers []Customer, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var NewRequest = func(method string, url string, payload io.Reader) (res *http.Request, err error) { return http.NewRequest(method, url, payload) }
Functions ¶
This section is empty.
Types ¶
type Customer ¶
type Customer struct { ID string `json:"id"` TeamID string `json:"teamId"` Name string `json:"name"` Email string `json:"email"` CustomID string `json:"customId"` ExpiresAt string `json:"expiresAt"` CustomerType string `json:"type"` Airgap bool `json:"airgap"` InstallationId string `json:"installationId"` Channels []Channel `json:"channels"` }
type CustomerSearchResponse ¶
type EntitlementValues ¶
type GetCustomerResponse ¶
type GetCustomerResponse struct {
Customer Customer `json:"customer"`
}
type IReplicated ¶
type IReplicated interface { SearchCustomersByEmail(email string, requestId string) (customers []Customer, err error) GetDowloadUrl(customer Customer, requestId string) (url string, err error) DownloadFromReplicated(url, requestId, authorization string) (res *http.Response, err error) }
func NewReplicatedImpl ¶
func NewReplicatedImpl(config config.ReplicatedConfig, logger logger.Logger) IReplicated
type MockReplicated ¶
type MockReplicated struct { SearchCustomersByEmailFunc func(email string, requestId string) (customers []Customer, err error) GetDowloadUrlFunc func(customer Customer, requestId string) (url string, err error) DownloadFromReplicatedFunc func(url, requestId, authorization string) (res *http.Response, err error) }
func (MockReplicated) DownloadFromReplicated ¶
func (m MockReplicated) DownloadFromReplicated(url, requestId, authorization string) (res *http.Response, err error)
func (MockReplicated) GetDowloadUrl ¶
func (m MockReplicated) GetDowloadUrl(customer Customer, requestId string) (url string, err error)
func (MockReplicated) SearchCustomersByEmail ¶
func (m MockReplicated) SearchCustomersByEmail(email string, requestId string) (customers []Customer, err error)
type ReplicatedImpl ¶
type ReplicatedImpl struct { ReplicatedConfig config.ReplicatedConfig Client HTTPClient Logger logger.Logger }
func (ReplicatedImpl) DownloadFromReplicated ¶
func (r ReplicatedImpl) DownloadFromReplicated(url, requestId, authorization string) (res *http.Response, err error)
func (*ReplicatedImpl) GetDowloadUrl ¶
func (r *ReplicatedImpl) GetDowloadUrl(customer Customer, requestId string) (url string, err error)
func (ReplicatedImpl) SearchCustomersByEmail ¶
func (r ReplicatedImpl) SearchCustomersByEmail(email string, requestId string) (customers []Customer, err error)
Click to show internal directories.
Click to hide internal directories.