suno

package
v1.0.3-preview Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: AGPL-3.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChannelName = "suno"
View Source
var ModelList = []string{
	"suno_music", "suno_lyrics",
}

Functions

This section is empty.

Types

type TaskAdaptor

type TaskAdaptor struct {
	taskcommon.BaseBilling
	ChannelType int
}

func (*TaskAdaptor) BuildRequestBody

func (a *TaskAdaptor) BuildRequestBody(c *gin.Context, info *relaycommon.RelayInfo) (io.Reader, error)

func (*TaskAdaptor) BuildRequestHeader

func (a *TaskAdaptor) BuildRequestHeader(c *gin.Context, req *http.Request, info *relaycommon.RelayInfo) error

func (*TaskAdaptor) BuildRequestURL

func (a *TaskAdaptor) BuildRequestURL(info *relaycommon.RelayInfo) (string, error)

func (*TaskAdaptor) DoRequest

func (a *TaskAdaptor) DoRequest(c *gin.Context, info *relaycommon.RelayInfo, requestBody io.Reader) (*http.Response, error)

func (*TaskAdaptor) DoResponse

func (a *TaskAdaptor) DoResponse(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo) (taskID string, taskData []byte, taskErr *dto.TaskError)

func (*TaskAdaptor) FetchTask

func (a *TaskAdaptor) FetchTask(baseUrl, key string, body map[string]any, proxy string) (*http.Response, error)

func (*TaskAdaptor) GetChannelName

func (a *TaskAdaptor) GetChannelName() string

func (*TaskAdaptor) GetModelList

func (a *TaskAdaptor) GetModelList() []string

func (*TaskAdaptor) Init

func (a *TaskAdaptor) Init(info *relaycommon.RelayInfo)

func (*TaskAdaptor) ParseTaskResult

func (a *TaskAdaptor) ParseTaskResult([]byte) (*relaycommon.TaskInfo, error)

ParseTaskResult is not used for Suno tasks. Suno polling uses a dedicated batch-fetch path (service.UpdateSunoTasks) that receives dto.TaskResponse[[]dto.SunoDataResponse] from the upstream /fetch API. This differs from the per-task polling used by video adaptors.

func (*TaskAdaptor) ValidateRequestAndSetAction

func (a *TaskAdaptor) ValidateRequestAndSetAction(c *gin.Context, info *relaycommon.RelayInfo) (taskErr *dto.TaskError)

Jump to

Keyboard shortcuts

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