feedback

package
v0.0.0-...-c97221a Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BugReport

type BugReport struct {
	Email       string `json:"email"`
	Description string `json:"description"`
}

BugReport represents user input when submitting an issue report swagger:model BugReport

func (*BugReport) Validate

func (br *BugReport) Validate() *apierror.APIError

Validate validates a bug report

type CreateBugReportResponse

type CreateBugReportResponse struct {
	Message     string `json:"message"`
	Email       string `json:"email"`
	Identity    string `json:"identity"`
	NodeCountry string `json:"node_country"`
	IpType      string `json:"ip_type"`
	Ip          string `json:"ip"`
}

CreateBugReportResponse response for bug report creation swagger:model CreateBugReportResponse

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter reports issues from users

func NewReporter

func NewReporter(
	logCollector logCollector,
	identityProvider identityProvider,
	originResolver location.OriginResolver,
	feedbackURL string,
) (*Reporter, error)

NewReporter constructs a new Reporter

func (*Reporter) NewBugReport

func (r *Reporter) NewBugReport(report BugReport) (*CreateBugReportResponse, *apierror.APIError, error)

NewBugReport creates a new bug report and returns the message that can be sent to intercom

func (*Reporter) NewIntercomIssue

NewIntercomIssue sends node logs, Identity and UserReport to intercom

func (*Reporter) NewIssue

NewIssue sends node logs, Identity and UserReport to the feedback service

type UserReport

type UserReport struct {
	BugReport
	UserId   string `json:"user_id"`
	UserType string `json:"user_type"`
}

UserReport represents user input when submitting an issue report swagger:model UserReport

func (*UserReport) Validate

func (ur *UserReport) Validate() *apierror.APIError

Validate validate UserReport

Jump to

Keyboard shortcuts

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