Documentation
¶
Overview ¶
Author: Calcium-Ion GitHub: https://github.com/Calcium-Ion/new-api Path: controller/midjourney.go
Index ¶
- Constants
- func ActivateUpdateMidjourneyTaskBulk()
- func AddChannel(c *gin.Context)
- func AddOrUpdateTelegramMenu(c *gin.Context)
- func AddPayment(c *gin.Context)
- func AddPrice(c *gin.Context)
- func AddRedemption(c *gin.Context)
- func AddToken(c *gin.Context)
- func AddUserGroup(c *gin.Context)
- func AdminCreatePrivateGroupInviteCode(c *gin.Context)
- func AdminDeletePrivateGroup(c *gin.Context)
- func AdminGrantPrivateGroup(c *gin.Context)
- func AdminListPrivateGroupInviteCodes(c *gin.Context)
- func AdminListPrivateGroupMembers(c *gin.Context)
- func AdminListPrivateGroups(c *gin.Context)
- func AdminListUserPrivateGroups(c *gin.Context)
- func AdminRevokePrivateGroup(c *gin.Context)
- func AdminUpdatePrivateGroup(c *gin.Context)
- func AdminUpdatePrivateGroupInviteCode(c *gin.Context)
- func AutomaticallyTestChannels(frequency int)
- func BatchDelModelChannels(c *gin.Context)
- func BatchDeleteChannel(c *gin.Context)
- func BatchDeletePrices(c *gin.Context)
- func BatchSetPrices(c *gin.Context)
- func BatchUpdateChannelsAzureApi(c *gin.Context)
- func ChangeChannelsTagStatus(c *gin.Context)
- func ChangeUserGroupEnable(c *gin.Context)
- func ChangeUserQuota(c *gin.Context)
- func CheckChannel(c *gin.Context)
- func CheckImg(c *gin.Context)
- func CheckOrderStatus(c *gin.Context)
- func CreateModelInfo(c *gin.Context)
- func CreateModelOwnedBy(c *gin.Context)
- func CreateOrder(c *gin.Context)
- func CreatePrivateGroup(c *gin.Context)
- func CreatePrivateGroupInviteCode(c *gin.Context)
- func CreateUser(c *gin.Context)
- func DeactivateMidjourneyTaskBulk()
- func DeleteChannel(c *gin.Context)
- func DeleteChannelTag(c *gin.Context)
- func DeleteChannelsTag(c *gin.Context)
- func DeleteDisabledChannel(c *gin.Context)
- func DeleteDisabledChannelsTag(c *gin.Context)
- func DeleteHistoryLogs(c *gin.Context)
- func DeleteModelInfo(c *gin.Context)
- func DeleteModelOwnedBy(c *gin.Context)
- func DeletePayment(c *gin.Context)
- func DeletePrice(c *gin.Context)
- func DeletePrivateGroup(c *gin.Context)
- func DeletePrivateGroupMember(c *gin.Context)
- func DeleteRedemption(c *gin.Context)
- func DeleteTelegramMenu(c *gin.Context)
- func DeleteToken(c *gin.Context)
- func DeleteUser(c *gin.Context)
- func DeleteUserGroup(c *gin.Context)
- func DeleteWebAuthnCredential(c *gin.Context)
- func DisableChannel(channelId int, channelName string, reason string, sendNotify bool)
- func EmailBind(c *gin.Context)
- func EnableChannel(channelId int, channelName string, sendNotify bool)
- func ExportMultiUserStatisticsCSV(c *gin.Context)
- func Favicon(buildFS embed.FS) gin.HandlerFunc
- func GenInvoice(c *gin.Context)
- func GenerateAccessToken(c *gin.Context)
- func GenerateOAuthCode(c *gin.Context)
- func GetAbout(c *gin.Context)
- func GetAffCode(c *gin.Context)
- func GetAllMidjourney(c *gin.Context)
- func GetAllModelInfo(c *gin.Context)
- func GetAllModelList(c *gin.Context)
- func GetAllModelOwnedBy(c *gin.Context)
- func GetAllTask(c *gin.Context)
- func GetChannel(c *gin.Context)
- func GetChannelsList(c *gin.Context)
- func GetChannelsTag(c *gin.Context)
- func GetChannelsTagAllList(c *gin.Context)
- func GetChannelsTagList(c *gin.Context)
- func GetGroups(c *gin.Context)
- func GetHomePageContent(c *gin.Context)
- func GetLogsList(c *gin.Context)
- func GetLogsSelfStat(c *gin.Context)
- func GetLogsStat(c *gin.Context)
- func GetModelInfo(c *gin.Context)
- func GetModelList(c *gin.Context)
- func GetModelOwnedBy(c *gin.Context)
- func GetMultiUserStatistics(c *gin.Context)
- func GetNotice(c *gin.Context)
- func GetOptions(c *gin.Context)
- func GetOrderList(c *gin.Context)
- func GetPayment(c *gin.Context)
- func GetPaymentList(c *gin.Context)
- func GetPlaygroundToken(c *gin.Context)
- func GetPricesList(c *gin.Context)
- func GetRateRealtime(c *gin.Context)
- func GetRedemption(c *gin.Context)
- func GetRedemptionsList(c *gin.Context)
- func GetSafeTools(c *gin.Context)
- func GetSelf(c *gin.Context)
- func GetStatisticsByPeriod(c *gin.Context)
- func GetStatisticsDetail(c *gin.Context)
- func GetStatus(c *gin.Context)
- func GetSubscription(c *gin.Context)
- func GetTelegramBotStatus(c *gin.Context)
- func GetTelegramMenu(c *gin.Context)
- func GetTelegramMenuList(c *gin.Context)
- func GetToken(c *gin.Context)
- func GetTokensListByAdmin(c *gin.Context)
- func GetUpdatePriceService(c *gin.Context)
- func GetUsage(c *gin.Context)
- func GetUser(c *gin.Context)
- func GetUserAllTask(c *gin.Context)
- func GetUserDashboard(c *gin.Context)
- func GetUserGroupById(c *gin.Context)
- func GetUserGroupRatio(c *gin.Context)
- func GetUserGroups(c *gin.Context)
- func GetUserInvoice(c *gin.Context)
- func GetUserInvoiceDetail(c *gin.Context)
- func GetUserLogsList(c *gin.Context)
- func GetUserMidjourney(c *gin.Context)
- func GetUserPaymentList(c *gin.Context)
- func GetUserTokensList(c *gin.Context)
- func GetUserWebAuthnCredentials(c *gin.Context)
- func GetUsersList(c *gin.Context)
- func GitHubBind(c *gin.Context)
- func GitHubOAuth(c *gin.Context)
- func GoogleBind(c *gin.Context)
- func GoogleEndpoint(c *gin.Context)
- func GoogleOAuth(c *gin.Context)
- func InitMidjourneyTask()
- func LarkBind(c *gin.Context)
- func LarkOAuth(c *gin.Context)
- func ListJoinedPrivateGroups(c *gin.Context)
- func ListPrivateGroupInviteCodes(c *gin.Context)
- func ListPrivateGroupMembers(c *gin.Context)
- func ListPrivateGroups(c *gin.Context)
- func LockOrder(tradeNo string)
- func Login(c *gin.Context)
- func Logout(c *gin.Context)
- func ManageUser(c *gin.Context)
- func MjTaskHandler(midjourneyChannel *model.Channel, taskIds []string, ...) error
- func OIDCAuth(c *gin.Context)
- func OIDCEndpoint(c *gin.Context)
- func PaymentCallback(c *gin.Context)
- func RedeemPrivateGroupInviteCode(c *gin.Context)
- func Register(c *gin.Context)
- func RelayNotFound(c *gin.Context)
- func ReloadTelegramBot(c *gin.Context)
- func ResetPassword(c *gin.Context)
- func SendEmailVerification(c *gin.Context)
- func SendPasswordResetEmail(c *gin.Context)
- func ShouldDisableChannel(channelType int, err *types.OpenAIErrorWithStatusCode) bool
- func SyncPricing(c *gin.Context)
- func SystemLog(c *gin.Context)
- func TelegramBotWebHook(c *gin.Context)
- func TestAllChannels(c *gin.Context)
- func TestChannel(c *gin.Context)
- func TokilakeConnect(c *gin.Context)
- func TopUp(c *gin.Context)
- func Unbind(c *gin.Context)
- func UnlockOrder(tradeNo string)
- func UpdateAllChannelsBalance(c *gin.Context)
- func UpdateChannel(c *gin.Context)
- func UpdateChannelBalance(c *gin.Context)
- func UpdateChannelsTag(c *gin.Context)
- func UpdateChannelsTagPriority(c *gin.Context)
- func UpdateInvoice(c *gin.Context)
- func UpdateMidjourneyTaskBulk()
- func UpdateModelInfo(c *gin.Context)
- func UpdateModelOwnedBy(c *gin.Context)
- func UpdateOption(c *gin.Context)
- func UpdatePayment(c *gin.Context)
- func UpdatePrice(c *gin.Context)
- func UpdatePrivateGroup(c *gin.Context)
- func UpdatePrivateGroupInviteCode(c *gin.Context)
- func UpdateRedemption(c *gin.Context)
- func UpdateSelf(c *gin.Context)
- func UpdateToken(c *gin.Context)
- func UpdateTokenByAdmin(c *gin.Context)
- func UpdateUser(c *gin.Context)
- func UpdateUserGroup(c *gin.Context)
- func UptimeKumaStatusPage(c *gin.Context)
- func UptimeKumaStatusPageHeartbeat(c *gin.Context)
- func WeChatAuth(c *gin.Context)
- func WeChatBind(c *gin.Context)
- func WebauthnBeginLogin(c *gin.Context)
- func WebauthnBeginRegistration(c *gin.Context)
- func WebauthnFinishLogin(c *gin.Context)
- func WebauthnFinishRegistration(c *gin.Context)
- type ChangeUserQuotaRequest
- type GitHubOAuthResponse
- type GitHubUser
- type GithubEmail
- type GoogleUser
- type LarkAppAccessTokenResponse
- type LarkUser
- type LarkUserAccessTokenResponse
- type LoginRequest
- type ManageRequest
- type MultiUserStatsRequest
- type OpenAICreditGrants
- type OpenAISubscriptionResponse
- type OpenAIUsageDailyCost
- type OpenAIUsageResponse
- type OrderRequest
- type OrderResponse
- type PasswordResetRequest
- type PriceBatchDeleteRequest
- type PriceBatchRequest
- type StatisticsByPeriod
- type StatisticsDetail
- type UnbindRequest
- type UpdateChannelsTagParams
Constants ¶
View Source
const API_LIMIT_KEY = "api-limiter:%d"
Variables ¶
This section is empty.
Functions ¶
func ActivateUpdateMidjourneyTaskBulk ¶
func ActivateUpdateMidjourneyTaskBulk()
func AddChannel ¶
func AddOrUpdateTelegramMenu ¶
func AddPayment ¶
func AddRedemption ¶
func AddUserGroup ¶
func AdminDeletePrivateGroup ¶
func AdminGrantPrivateGroup ¶
func AdminListPrivateGroups ¶
func AdminRevokePrivateGroup ¶
func AdminUpdatePrivateGroup ¶
func AutomaticallyTestChannels ¶
func AutomaticallyTestChannels(frequency int)
func BatchDelModelChannels ¶
func BatchDeleteChannel ¶
func BatchDeletePrices ¶
func BatchSetPrices ¶
func ChangeChannelsTagStatus ¶
func ChangeUserGroupEnable ¶
func ChangeUserQuota ¶
func CheckChannel ¶
func CheckOrderStatus ¶
func CreateModelInfo ¶
func CreateModelOwnedBy ¶
func CreatePrivateGroup ¶
func CreateUser ¶
func DeactivateMidjourneyTaskBulk ¶
func DeactivateMidjourneyTaskBulk()
func DeleteChannel ¶
func DeleteChannelTag ¶
func DeleteChannelsTag ¶
func DeleteDisabledChannel ¶
func DeleteHistoryLogs ¶
func DeleteModelInfo ¶
func DeleteModelOwnedBy ¶
func DeletePayment ¶
func DeletePrice ¶
func DeletePrivateGroup ¶
func DeleteRedemption ¶
func DeleteTelegramMenu ¶
func DeleteToken ¶
func DeleteUser ¶
func DeleteUserGroup ¶
func DisableChannel ¶
disable & notify
func EnableChannel ¶
enable & notify
func ExportMultiUserStatisticsCSV ¶
ExportMultiUserStatisticsCSV 导出多个用户的统计数据为CSV
func GenInvoice ¶
func GenerateAccessToken ¶
func GenerateOAuthCode ¶
func GetAffCode ¶
func GetAllMidjourney ¶
func GetAllModelInfo ¶
func GetAllModelList ¶
func GetAllModelOwnedBy ¶
func GetAllTask ¶
func GetChannel ¶
func GetChannelsList ¶
func GetChannelsTag ¶
func GetChannelsTagAllList ¶
func GetChannelsTagList ¶
func GetHomePageContent ¶
func GetLogsList ¶
func GetLogsSelfStat ¶
func GetLogsStat ¶
func GetModelInfo ¶
func GetModelList ¶
func GetModelOwnedBy ¶
func GetMultiUserStatistics ¶
GetMultiUserStatistics 获取多个用户的统计数据
func GetOptions ¶
func GetOrderList ¶
func GetPayment ¶
func GetPaymentList ¶
func GetPlaygroundToken ¶
func GetPricesList ¶
func GetRateRealtime ¶
func GetRedemption ¶
func GetRedemptionsList ¶
func GetSafeTools ¶
func GetStatisticsByPeriod ¶
func GetStatisticsDetail ¶
func GetSubscription ¶
func GetTelegramBotStatus ¶
func GetTelegramMenu ¶
func GetTelegramMenuList ¶
func GetTokensListByAdmin ¶
GetTokensListByAdmin 管理员查询令牌列表(可按用户ID或令牌ID查询)
func GetUpdatePriceService ¶
func GetUserAllTask ¶
func GetUserDashboard ¶
func GetUserGroupById ¶
func GetUserGroupRatio ¶
func GetUserGroups ¶
func GetUserInvoiceDetail ¶
GetUserInvoiceDetail 获取用户指定月份的账单详情。
func GetUserLogsList ¶
func GetUserMidjourney ¶
func GetUserPaymentList ¶
func GetUserTokensList ¶
func GetUsersList ¶
func GitHubBind ¶
func GitHubOAuth ¶
func GoogleBind ¶
func GoogleEndpoint ¶
func GoogleOAuth ¶
func InitMidjourneyTask ¶
func InitMidjourneyTask()
func ListJoinedPrivateGroups ¶
func ListPrivateGroupMembers ¶
func ListPrivateGroups ¶
func MjTaskHandler ¶
func OIDCAuth ¶
OIDCAuth 通过OIDC登录 首先通过OIDC ID进行登录、如果登录失败尝试使用USERNAME 进行登录(遵循用户禁用条件),如果OIDC ID和USERNAME都不存在则注册新用户(遵循是否开启注册功能条件)
func OIDCEndpoint ¶
func PaymentCallback ¶
func RelayNotFound ¶
func ReloadTelegramBot ¶
func ResetPassword ¶
func SendEmailVerification ¶
func SendPasswordResetEmail ¶
func ShouldDisableChannel ¶
func ShouldDisableChannel(channelType int, err *types.OpenAIErrorWithStatusCode) bool
func SyncPricing ¶
func SystemLog ¶
SystemLog handles the request to get the latest system logs from the log file It accepts a POST request with a 'count' parameter specifying the number of logs to return
func TelegramBotWebHook ¶
func TestAllChannels ¶
func TestChannel ¶
func TokilakeConnect ¶
func UpdateChannel ¶
func UpdateChannelBalance ¶
func UpdateChannelsTag ¶
func UpdateInvoice ¶
func UpdateMidjourneyTaskBulk ¶
func UpdateMidjourneyTaskBulk()
func UpdateModelInfo ¶
func UpdateModelOwnedBy ¶
func UpdateOption ¶
func UpdatePayment ¶
func UpdatePrice ¶
func UpdatePrivateGroup ¶
func UpdateRedemption ¶
func UpdateSelf ¶
func UpdateToken ¶
func UpdateTokenByAdmin ¶
UpdateTokenByAdmin 管理员更新任意token(支持转移用户)
func UpdateUser ¶
func UpdateUserGroup ¶
func UptimeKumaStatusPage ¶
func WeChatAuth ¶
func WeChatBind ¶
Types ¶
type ChangeUserQuotaRequest ¶
type GitHubOAuthResponse ¶
type GitHubUser ¶
type GithubEmail ¶
type GoogleUser ¶
type LoginRequest ¶
type ManageRequest ¶
type MultiUserStatsRequest ¶
type OpenAICreditGrants ¶
type OpenAISubscriptionResponse ¶
type OpenAISubscriptionResponse struct {
Object string `json:"object"`
HasPaymentMethod bool `json:"has_payment_method"`
SoftLimitUSD float64 `json:"soft_limit_usd"`
HardLimitUSD float64 `json:"hard_limit_usd"`
SystemHardLimitUSD float64 `json:"system_hard_limit_usd"`
AccessUntil int64 `json:"access_until"`
}
type OpenAIUsageDailyCost ¶
type OpenAIUsageResponse ¶
type OrderRequest ¶
type OrderResponse ¶
type OrderResponse struct {
TradeNo string `json:"trade_no"`
*types.PayRequest
}
type PasswordResetRequest ¶
type PriceBatchDeleteRequest ¶
type PriceBatchDeleteRequest struct {
Models []string `json:"models" binding:"required"`
}
type PriceBatchRequest ¶
type PriceBatchRequest struct {
OriginalModels []string `json:"original_models"`
model.BatchPrices
}
type StatisticsByPeriod ¶
type StatisticsByPeriod struct {
UserStatistics []*model.UserStatisticsByPeriod `json:"user_statistics"`
ChannelStatistics []*model.LogStatisticGroupChannel `json:"channel_statistics"`
RedemptionStatistics []*model.RedemptionStatisticsGroup `json:"redemption_statistics"`
OrderStatistics []*model.OrderStatisticsGroup `json:"order_statistics"`
}
type StatisticsDetail ¶
type StatisticsDetail struct {
UserStatistics *model.StatisticsUser `json:"user_statistics"`
ChannelStatistics []*model.ChannelStatistics `json:"channel_statistics"`
RedemptionStatistic []*model.RedemptionStatistics `json:"redemption_statistic"`
OrderStatistics []*model.OrderStatistics `json:"order_statistics"`
}
type UnbindRequest ¶
type UnbindRequest struct {
Type string `json:"type"`
}
type UpdateChannelsTagParams ¶
Source Files
¶
- analytics.go
- auth_policy.go
- billing.go
- channel-billing.go
- channel-model.go
- channel-test.go
- channel.go
- channel_tag.go
- check_channel.go
- common.go
- favicon.go
- github.go
- google.go
- group.go
- invoice.go
- lark.go
- log.go
- midjourney.go
- misc.go
- model_info.go
- model_ownedby.go
- multi_user_statistics.go
- oidc.go
- option.go
- order.go
- payment.go
- pricing.go
- private_group.go
- redemption.go
- system_log.go
- task.go
- telegram.go
- token.go
- tokilake.go
- uptime_kuma.go
- user.go
- user_group.go
- webauthn.go
- wechat.go
Click to show internal directories.
Click to hide internal directories.