repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/service/model/o_drive.go | service/model/o_drive.go | package model
type PeerDriveDBModel struct {
ID string `gorm:"column:id;primary_key" json:"id"`
Updated int64 `gorm:"autoUpdateTime"`
Created int64 `gorm:"autoCreateTime"`
UserAgent string `json:"user_agent"`
DisplayName string `json:"display_name"`
DeviceName string `json:"device_name"`
M... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/service/model/o_notify.go | service/model/o_notify.go | package model
type AppNotify struct {
State int `json:"state"` //0:一直在变动的未读消息 1:未读 2:已读
Message string `json:"message"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Id string `json:"id"`
Type int `json:"type"`
Icon string `json:"icon"`
Name string... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/service/model/o_connections.go | service/model/o_connections.go | /*
* @Author: LinkLeong link@icewhale.org
* @Date: 2022-07-26 17:17:57
* @LastEditors: LinkLeong
* @LastEditTime: 2022-08-01 17:08:08
* @FilePath: /CasaOS/service/model/o_connections.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package model
ty... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/service/model/o_rely.go | service/model/o_rely.go | package model
import (
"time"
)
type RelyDBModel struct {
Id uint `gorm:"column:id;primary_key" json:"id"`
CustomId string ` json:"custom_id"`
ContainerCustomId string `json:"container_custom_id"`
ContainerId string `json:"container_id,omitempty"`
Type in... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/cmd/message-bus-docgen/main.go | cmd/message-bus-docgen/main.go | package main
import (
"github.com/IceWhaleTech/CasaOS-Common/external"
"github.com/IceWhaleTech/CasaOS/codegen/message_bus"
"github.com/IceWhaleTech/CasaOS/common"
"github.com/samber/lo"
)
func main() {
eventTypes := lo.Map(common.EventTypes, func(item message_bus.EventType, index int) external.EventType {
ret... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/cmd/migration-tool/log.go | cmd/migration-tool/log.go | package main
import (
"log"
"os"
)
type Logger struct {
DebugMode bool
_debug *log.Logger
_info *log.Logger
_error *log.Logger
}
func NewLogger() *Logger {
return &Logger{
DebugMode: false,
_debug: log.New(os.Stdout, "DEBUG: ", 0),
_info: log.New(os.Stdout, "", 0),
_error: log.New(os.Stder... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/cmd/migration-tool/migration_dummy.go | cmd/migration-tool/migration_dummy.go | package main
import (
interfaces "github.com/IceWhaleTech/CasaOS-Common"
)
type migrationTool struct{}
func (u *migrationTool) IsMigrationNeeded() (bool, error) {
return false, nil
}
func (u *migrationTool) PreMigrate() error {
return nil
}
func (u *migrationTool) Migrate() error {
return nil
}
func (u *migra... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/cmd/migration-tool/main.go | cmd/migration-tool/main.go | /*
* @Author: LinkLeong link@icewhale.org
* @Date: 2022-08-23 18:09:11
* @LastEditors: LinkLeong
* @LastEditTime: 2022-08-31 14:17:51
* @FilePath: /CasaOS/cmd/migration-tool/main.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package main
import ... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/storage.go | model/storage.go | package model
import "time"
type StorageA struct {
ID uint `json:"id" gorm:"primaryKey"` // unique key
MountPath string `json:"mount_path" gorm:"unique" binding:"required"` // must be standardized
Order int `json:"order"` ... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/share.go | model/share.go | /*
* @Author: LinkLeong link@icewhale.org
* @Date: 2022-07-26 11:12:12
* @LastEditors: LinkLeong
* @LastEditTime: 2022-07-27 14:58:55
* @FilePath: /CasaOS/model/share.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package model
type Shares struct... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/file.go | model/file.go | /*
* @Author: LinkLeong link@icewhale.com
* @Date: 2022-05-20 16:27:12
* @LastEditors: LinkLeong
* @LastEditTime: 2022-06-09 18:18:46
* @FilePath: /CasaOS/model/file.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package model
type FileOperate st... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/drive.go | model/drive.go | package model
type Drive struct {
Name string `json:"name"`
Icon string `json:"icon"`
AuthUrl string `json:"auth_url"`
}
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/stream.go | model/stream.go | package model
import (
"io"
)
type FileStream struct {
Obj
io.ReadCloser
Mimetype string
WebPutAsTask bool
Old Obj
}
func (f *FileStream) GetMimetype() string {
return f.Mimetype
}
func (f *FileStream) NeedStore() bool {
return f.WebPutAsTask
}
func (f *FileStream) GetReadCloser() io.ReadClose... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/net.go | model/net.go | package model
type IOCountersStat struct {
Name string `json:"name"` // interface name
BytesSent uint64 `json:"bytesSent"` // number of bytes sent
BytesRecv uint64 `json:"bytesRecv"` // number of bytes received
PacketsSent uint64 `json:"packetsSent"` // number of packets sent
PacketsRecv uin... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/req.go | model/req.go | package model
type PageReq struct {
Index int `json:"page" form:"index"`
Size int `json:"size" form:"size"`
}
const MaxUint = ^uint(0)
const MinUint = 0
const MaxInt = int(MaxUint >> 1)
const MinInt = -MaxInt - 1
func (p *PageReq) Validate() {
if p.Index < 1 {
p.Index = 1
}
if p.Size < 1 {
p.Size = 100000
... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/ddns.go | model/ddns.go | package model
type GoDaddyModel struct {
Type uint `json:"type"`
ApiHost string `json:"api_host"`
Key string `json:"key"`
Secret string `json:"secret"`
Host string `json:"host"`
}
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/setting.go | model/setting.go | package model
const (
SINGLE = iota
SITE
STYLE
PREVIEW
GLOBAL
ARIA2
INDEX
GITHUB
)
const (
PUBLIC = iota
PRIVATE
READONLY
DEPRECATED
)
type SettingItem struct {
Key string `json:"key" gorm:"primaryKey" binding:"required"` // unique key
Value string `json:"value"` ... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/search.go | model/search.go | package model
type SearchEngine struct {
Name string `json:"name"`
Icon string `json:"icon"`
SearchUrl string `json:"search_url"`
RecoUrl string `json:"reco_url"`
Data []string `json:"data"`
}
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/zima.go | model/zima.go | /*
* @Author: LinkLeong link@icewhale.org
* @Date: 2022-05-13 18:15:46
* @LastEditors: LinkLeong
* @LastEditTime: 2022-08-01 18:32:57
* @FilePath: /CasaOS/model/zima.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package model
import "time"
type... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/connections.go | model/connections.go | /*
* @Author: LinkLeong link@icewhale.org
* @Date: 2022-07-27 10:30:43
* @LastEditors: LinkLeong
* @LastEditTime: 2022-08-04 20:06:04
* @FilePath: /CasaOS/model/connections.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package model
type Connect... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/args.go | model/args.go | package model
import (
"io"
"net/http"
"time"
)
type ListArgs struct {
ReqPath string
}
type LinkArgs struct {
IP string
Header http.Header
Type string
}
type Link struct {
URL string `json:"url"`
Header http.Header `json:"header"` // needed header
Data io.ReadCloser // ... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/obj.go | model/obj.go | package model
import (
"io"
"regexp"
"sort"
"strings"
"time"
mapset "github.com/deckarep/golang-set/v2"
"github.com/maruel/natural"
)
type UnwrapObj interface {
Unwrap() Obj
}
type Obj interface {
GetSize() int64
GetName() string
ModTime() time.Time
IsDir() bool
// The internal information of the dri... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/sys_common.go | model/sys_common.go | /*
* @Author: LinkLeong link@icewhale.com
* @Date: 2022-05-13 18:15:46
* @LastEditors: LinkLeong
* @LastEditTime: 2022-09-02 22:12:34
* @FilePath: /CasaOS/model/sys_common.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package model
import "time"... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/object.go | model/object.go | package model
import (
"time"
)
type ObjWrapName struct {
Name string
Obj
}
func (o *ObjWrapName) Unwrap() Obj {
return o.Obj
}
func (o *ObjWrapName) GetName() string {
if o.Name == "" {
o.Name = o.Obj.GetName()
}
return o.Name
}
type Object struct {
ID string
Path string
Name string
Siz... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/notify.go | model/notify.go | package model
type NotifyMssage struct {
Type string `json:"type"`
Data string `json:"data"`
}
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/version.go | model/version.go | package model
import "time"
type Version struct {
Id uint `gorm:"column:id;primary_key" json:"id"`
ChangeLog string `json:"change_log"`
Version string `json:"version"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/user.go | model/user.go | package model
type UserInfo struct {
NickName string `json:"nick_name"`
Desc string `json:"desc"`
ShareId string `json:"share_id"`
Avatar string `json:"avatar"`
Version int `json:"version,omitempty"`
}
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/heart.go | model/heart.go | package model
type CasaOSHeart struct {
UuId string `json:"uuid"`
Type string `json:"type"`
}
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/common.go | model/common.go | package model
type PageResp struct {
Content interface{} `json:"content"`
Total int64 `json:"total"`
}
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/system_model/verify_information.go | model/system_model/verify_information.go | /*
* @Author: LinkLeong link@icewhale.com
* @Date: 2022-06-15 11:30:47
* @LastEditors: LinkLeong
* @LastEditTime: 2022-06-23 18:40:40
* @FilePath: /CasaOS/model/system_model/verify_information.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/notify/storage.go | model/notify/storage.go | /*
* @Author: LinkLeong link@icewhale.com
* @Date: 2022-07-15 10:43:00
* @LastEditors: LinkLeong
* @LastEditTime: 2022-07-15 10:56:17
* @FilePath: /CasaOS/model/notify/storage.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package notify
type Sto... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/notify/file.go | model/notify/file.go | /*
* @Author: LinkLeong link@icewhale.com
* @Date: 2022-05-26 14:21:57
* @LastEditors: LinkLeong
* @LastEditTime: 2022-06-02 11:14:15
* @FilePath: /CasaOS/model/notify/file.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package notify
type File s... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/notify/result.go | model/notify/result.go | /*
* @Author: LinkLeong link@icewhale.com
* @Date: 2022-05-26 14:21:11
* @LastEditors: LinkLeong
* @LastEditTime: 2022-05-27 11:15:59
* @FilePath: /CasaOS/model/notify/result.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package notify
// Notif... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/model/system_app/sync.go | model/system_app/sync.go | package system_app
import "encoding/xml"
type SyncConfig struct {
XMLName xml.Name `xml:"configuration"`
Key string `xml:"gui>apikey"`
}
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/interfaces/migrationTool.go | interfaces/migrationTool.go | /*
* @Author: LinkLeong link@icewhale.org
* @Date: 2022-08-24 17:37:36
* @LastEditors: LinkLeong
* @LastEditTime: 2022-08-24 17:38:48
* @FilePath: /CasaOS/interfaces/migrationTool.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package interfaces
... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/common/constants.go | common/constants.go | package common
const (
SERVICENAME = "casaos"
VERSION = "0.4.15"
BODY = " "
RANW_NAME = "IceWhale-RemoteAccess"
)
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/common/message.go | common/message.go | package common
import (
"github.com/IceWhaleTech/CasaOS/codegen/message_bus"
)
// devtype -> action -> event
var EventTypes = []message_bus.EventType{
{Name: "casaos:system:utilization", SourceID: SERVICENAME, PropertyTypeList: []message_bus.PropertyType{}},
{Name: "casaos:file:recover", SourceID: SERVICENAME, Pro... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/types/person.go | types/person.go | package types
const PERSONADDFRIEND = "add_user"
const PERSONAGREEFRIEND = "agree_user"
const PERSONDOWNLOAD = "file_data"
const PERSONSUMMARY = "summary"
const PERSONGETIP = "get_ip"
const PERSONCONNECTION = "connection"
const PERSONDIRECTORY = "directory"
const PERSONHELLO = "hello"
const PERSONSHAREID = "share_id"
... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/types/person_download.go | types/person_download.go | package types
const (
DOWNLOADAWAIT = iota //default state
DOWNLOADING
DOWNLOADPAUSE
DOWNLOADFINISH
DOWNLOADERROR
DOWNLOADFINISHED
)
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/types/search.go | types/search.go | package types
const (
APPLICATION = iota
MEDIA
PICTURE
MUSIC
SEARCH
UNKNOWN
)
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/types/rely.go | types/rely.go | package types
const RELY_TYPE_MYSQL = iota
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/types/friend.go | types/friend.go | package types
const (
FRIENDSTATEDEFAULT = iota
FRIENDSTATEWAIT
FRIENDSTATEREQUEST
)
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/types/task.go | types/task.go | package types
const (
TASK_TYPE_USER = iota
TASK_TYPE_APP
)
const (
TASK_DATA_TYPE_LINK = iota
TASK_DATA_TYPE_TEXT
)
const (
TASK_STATE_UNCOMPLETE = iota
TASK_STATE_COMPLETED
)
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/types/notify.go | types/notify.go | package types
const (
NOTIFY_DYNAMICE = iota
NOTIFY_UNREAD
NOTIFY_READ
)
const (
NOTIFY_TYPE_UNIMPORTANT = iota + 1
NOTIFY_TYPE_NEED_CONFIRM
NOTIFY_TYPE_ERROR
NOTIFY_TYPE_INSTALL_LOG
NOTIFY_TYPE_PERSION_FIRNED_LEAVE
NOTIFY_TYPE_PERSION_FIRNED_LIVE
NOTIFY_TYPE_HEALTH_CHECK
)
const (
NOTIFY_APP = iota
)
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/all.go | drivers/all.go | package drivers
import (
_ "github.com/IceWhaleTech/CasaOS/drivers/dropbox"
_ "github.com/IceWhaleTech/CasaOS/drivers/google_drive"
_ "github.com/IceWhaleTech/CasaOS/drivers/onedrive"
)
// All do nothing,just for import
// same as _ import
func All() {
}
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/dropbox/drive.go | drivers/dropbox/drive.go | package dropbox
import (
"context"
"errors"
"net/http"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS/internal/driver"
"github.com/IceWhaleTech/CasaOS/model"
"github.com/IceWhaleTech/CasaOS/pkg/utils"
"github.com/go-resty/resty/v2"
"go.uber.org/zap"
)
type Dropbox struc... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/dropbox/types.go | drivers/dropbox/types.go | package dropbox
import (
"time"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS/model"
"go.uber.org/zap"
)
type UserInfo struct {
AccountID string `json:"account_id"`
Name struct {
GivenName string `json:"given_name"`
Surname string `json:"surname"`
... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/dropbox/meta.go | drivers/dropbox/meta.go | package dropbox
import (
"github.com/IceWhaleTech/CasaOS/internal/driver"
)
const ICONURL = "./img/driver/Dropbox.svg"
type Addition struct {
driver.RootID
RefreshToken string `json:"refresh_token" required:"true" omit:"true"`
AppKey string `json:"app_key" type:"string" default:"tciqajyazzdygt9" omit:"... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/dropbox/util.go | drivers/dropbox/util.go | package dropbox
import (
"fmt"
"net/http"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS/drivers/base"
"github.com/go-resty/resty/v2"
"go.uber.org/zap"
)
var (
app_key = "private build"
app_secret = "private build"
)
func (d *Dropbox) getRefreshToken() error {
url :... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/onedrive/drive.go | drivers/onedrive/drive.go | package onedrive
import (
"context"
"fmt"
"net/http"
"strconv"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS/internal/driver"
"github.com/IceWhaleTech/CasaOS/model"
"go.uber.org/zap"
)
type Onedrive struct {
model.StorageA
Addition
AccessToken string
}
func (d *One... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/onedrive/meta.go | drivers/onedrive/meta.go | package onedrive
import (
"github.com/IceWhaleTech/CasaOS/internal/driver"
)
const ICONURL = "./img/driver/OneDrive.svg"
type Host struct {
Oauth string
Api string
}
type TokenErr struct {
Error string `json:"error"`
ErrorDescription string `json:"error_description"`
}
type RespErr struct {
Erro... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/onedrive/util.go | drivers/onedrive/util.go | package onedrive
import (
"errors"
"fmt"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS/drivers/base"
"github.com/IceWhaleTech/CasaOS/pkg/utils"
"go.uber.org/zap"
)
var (
client_id = "private build"
client_secret = "private build"
)
var onedriveHostMap = map[string]... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/base/client.go | drivers/base/client.go | package base
import (
"net/http"
"time"
"github.com/go-resty/resty/v2"
)
var NoRedirectClient *resty.Client
var RestyClient = NewRestyClient()
var HttpClient = &http.Client{}
var UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
var De... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/base/types.go | drivers/base/types.go | package base
import "github.com/go-resty/resty/v2"
type Json map[string]interface{}
type TokenResp struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
}
type ReqCallback func(req *resty.Request)
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/google_drive/drive.go | drivers/google_drive/drive.go | package google_drive
import (
"context"
"errors"
"fmt"
"net/http"
"strconv"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS/drivers/base"
"github.com/IceWhaleTech/CasaOS/internal/driver"
"github.com/IceWhaleTech/CasaOS/model"
"github.com/IceWhaleTech/CasaOS/pkg/utils"
"... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/google_drive/types.go | drivers/google_drive/types.go | package google_drive
import (
"strconv"
"time"
"github.com/IceWhaleTech/CasaOS/model"
log "github.com/sirupsen/logrus"
)
type UserInfo struct {
User struct {
Kind string `json:"kind"`
DisplayName string `json:"displayName"`
PhotoLink string `json:"photoLink"`
Me bool `json:"me"`
... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/google_drive/meta.go | drivers/google_drive/meta.go | package google_drive
import (
"github.com/IceWhaleTech/CasaOS/internal/driver"
)
const ICONURL = "./img/driver/GoogleDrive.svg"
type Addition struct {
driver.RootID
RefreshToken string `json:"refresh_token" required:"true" omit:"true"`
OrderBy string `json:"order_by" type:"string" help:"such as: folder,... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/drivers/google_drive/util.go | drivers/google_drive/util.go | package google_drive
import (
"context"
"fmt"
"io"
"net/http"
"strconv"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS/drivers/base"
"github.com/IceWhaleTech/CasaOS/model"
"github.com/IceWhaleTech/CasaOS/pkg/utils"
"github.com/go-resty/resty/v2"
log "github.com/sirupse... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/internal/sign/sign.go | internal/sign/sign.go | package sign
import (
"sync"
"time"
"github.com/IceWhaleTech/CasaOS/pkg/sign"
)
var once sync.Once
var instance sign.Sign
func Sign(data string) string {
return NotExpired(data)
}
func WithDuration(data string, d time.Duration) string {
once.Do(Instance)
return instance.Sign(data, time.Now().Add(d).Unix())... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/internal/op/hook.go | internal/op/hook.go | package op
import (
"regexp"
"strings"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS/internal/conf"
"github.com/IceWhaleTech/CasaOS/internal/driver"
"github.com/IceWhaleTech/CasaOS/model"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
"go.uber.org/zap"
)... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/internal/op/driver.go | internal/op/driver.go | package op
import (
"reflect"
"strings"
"github.com/IceWhaleTech/CasaOS/internal/conf"
"github.com/IceWhaleTech/CasaOS/internal/driver"
"github.com/pkg/errors"
)
type New func() driver.Driver
var driverNewMap = map[string]New{}
var driverInfoMap = map[string][]driver.Item{} //driver.Info{}
func RegisterDrive... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/internal/op/const.go | internal/op/const.go | package op
const (
WORK = "work"
RootName = "root"
)
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/internal/driver/driver.go | internal/driver/driver.go | package driver
import (
"context"
"github.com/IceWhaleTech/CasaOS/model"
)
type Driver interface {
Meta
Reader
User
//Writer
//Other
}
type Meta interface {
Config() Config
// GetStorage just get raw storage, no need to implement, because model.Storage have implemented
GetStorage() *model.StorageA
SetSto... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/internal/driver/config.go | internal/driver/config.go | /*
* @Author: a624669980@163.com a624669980@163.com
* @Date: 2022-12-13 11:05:05
* @LastEditors: a624669980@163.com a624669980@163.com
* @LastEditTime: 2022-12-13 11:05:13
* @FilePath: /drive/internal/driver/config.go
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/ko... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/internal/driver/item.go | internal/driver/item.go | /*
* @Author: a624669980@163.com a624669980@163.com
* @Date: 2022-12-13 11:05:47
* @LastEditors: a624669980@163.com a624669980@163.com
* @LastEditTime: 2022-12-13 11:05:54
* @FilePath: /drive/internal/driver/item.go
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/internal/conf/config.go | internal/conf/config.go | package conf
type Database struct {
Type string `json:"type" env:"DB_TYPE"`
Host string `json:"host" env:"DB_HOST"`
Port int `json:"port" env:"DB_PORT"`
User string `json:"user" env:"DB_USER"`
Password string `json:"password" env:"DB_PASS"`
Name string `json:"name" env:"D... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/internal/conf/var.go | internal/conf/var.go | package conf
import "regexp"
var (
BuiltAt string
GoVersion string
GitAuthor string
GitCommit string
Version string = "dev"
WebVersion string
)
var (
Conf *Config
)
var SlicesMap = make(map[string][]string)
var FilenameCharMap = make(map[string]string)
var PrivacyReg []*regexp.Regexp
var (
// Stor... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/internal/conf/const.go | internal/conf/const.go | package conf
const (
TypeString = "string"
TypeSelect = "select"
TypeBool = "bool"
TypeText = "text"
TypeNumber = "number"
)
const (
// site
VERSION = "version"
ApiUrl = "api_url"
BasePath = "base_path"
SiteTitle = "site_title"
Announcement = "announcement"
AllowIndexed = "allow_inde... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/init.go | route/init.go | /*
* @Author: LinkLeong link@icewhale.org
* @Date: 2022-11-15 15:51:44
* @LastEditors: LinkLeong
* @LastEditTime: 2022-11-15 15:55:16
* @FilePath: /CasaOS/route/init.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package route
import (
"encoding... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v2.go | route/v2.go | package route
import (
"crypto/ecdsa"
"log"
"net/http"
"net/url"
"path"
"path/filepath"
"strconv"
"strings"
"github.com/IceWhaleTech/CasaOS/codegen"
"github.com/IceWhaleTech/CasaOS/pkg/config"
"github.com/IceWhaleTech/CasaOS/pkg/utils/file"
"github.com/IceWhaleTech/CasaOS-Common/external"
"github.com/Ic... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/periodical.go | route/periodical.go | //go:build !darwin
// +build !darwin
/*
* @Author: LinkLeong link@icewhale.com
* @Date: 2022-07-01 15:11:36
* @LastEditors: LinkLeong
* @LastEditTime: 2022-09-05 16:28:46
* @FilePath: /CasaOS/route/periodical.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Rese... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v1.go | route/v1.go | package route
import (
"crypto/ecdsa"
"net/http"
"strconv"
"github.com/IceWhaleTech/CasaOS-Common/external"
"github.com/IceWhaleTech/CasaOS-Common/utils/jwt"
"github.com/IceWhaleTech/CasaOS/common"
"github.com/IceWhaleTech/CasaOS/pkg/config"
v1 "github.com/IceWhaleTech/CasaOS/route/v1"
"github.com/labstack/e... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v1/recover.go | route/v1/recover.go | package v1
import (
"context"
"net/http"
"strconv"
"strings"
"time"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS/drivers/dropbox"
"github.com/IceWhaleTech/CasaOS/drivers/google_drive"
"github.com/IceWhaleTech/CasaOS/drivers/onedrive"
"github.com/IceWhaleTech/CasaOS/se... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v1/file.go | route/v1/file.go | package v1
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"net/url"
url2 "net/url"
"os"
"path"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS/model"
"github.com/gorilla/websocket"
"github.com/l... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | true |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v1/samba.go | route/v1/samba.go | /*
* @Author: LinkLeong link@icewhale.com
* @Date: 2022-07-26 11:08:48
* @LastEditors: LinkLeong
* @LastEditTime: 2022-08-17 18:25:42
* @FilePath: /CasaOS/route/v1/samba.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package v1
import (
"fmt"
"... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v1/driver.go | route/v1/driver.go | package v1
import (
"github.com/IceWhaleTech/CasaOS-Common/utils/common_err"
"github.com/IceWhaleTech/CasaOS/drivers/dropbox"
"github.com/IceWhaleTech/CasaOS/drivers/google_drive"
"github.com/IceWhaleTech/CasaOS/drivers/onedrive"
"github.com/IceWhaleTech/CasaOS/model"
"github.com/labstack/echo/v4"
)
func ListDr... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v1/cloud.go | route/v1/cloud.go | package v1
import (
"strings"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS/drivers/dropbox"
"github.com/IceWhaleTech/CasaOS/drivers/google_drive"
"github.com/IceWhaleTech/CasaOS/drivers/onedrive"
"github.com/IceWhaleTech/CasaOS/model"
"github.com/IceWhaleTech/CasaOS/pkg/... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v1/notify_old.go | route/v1/notify_old.go | package v1
import (
"fmt"
"net/http"
"github.com/IceWhaleTech/CasaOS/service"
"github.com/IceWhaleTech/CasaOS/types"
"github.com/gorilla/websocket"
"github.com/labstack/echo/v4"
)
var upGrader = websocket.Upgrader{
CheckOrigin: func(r *http.Request) bool {
return true
},
}
// @Summary websocket 接口,连接成功后发送... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v1/ssh.go | route/v1/ssh.go | package v1
import (
"bytes"
"net/http"
"os/exec"
"strconv"
"time"
"github.com/IceWhaleTech/CasaOS-Common/utils/common_err"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger"
sshHelper "github.com/IceWhaleTech/CasaOS-Common/utils/ssh"
"github.com/IceWhaleTech/CasaOS/pkg/utils"
"github.com/labstack/echo/v4"... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v1/other.go | route/v1/other.go | package v1
import (
"fmt"
"github.com/IceWhaleTech/CasaOS/model"
"github.com/IceWhaleTech/CasaOS/pkg/utils/common_err"
"github.com/IceWhaleTech/CasaOS/service"
"github.com/labstack/echo/v4"
)
func GetSearchResult(ctx echo.Context) error {
json := make(map[string]string)
ctx.Bind(&json)
url := json["url"]
i... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v1/system.go | route/v1/system.go | package v1
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"runtime"
"strconv"
"strings"
"time"
"unsafe"
http2 "github.com/IceWhaleTech/CasaOS-Common/utils/http"
"github.com/IceWhaleTech/CasaOS-Common/utils/port"
"github.com/IceWhaleTech/CasaOS/common"
"github.com/IceWhaleTech/... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v1/zerotier.go | route/v1/zerotier.go | package v1
import (
"fmt"
"io/ioutil"
"math/rand"
"net"
"net/http"
"strings"
"time"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS/common"
"github.com/IceWhaleTech/CasaOS/pkg/utils/httper"
"github.com/labstack/echo/v4"
"github.com/tidwall/gjson"
"go.uber.org/zap"
)
... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v1/notify.go | route/v1/notify.go | package v1
import (
"net/http"
"github.com/IceWhaleTech/CasaOS/model"
"github.com/IceWhaleTech/CasaOS/pkg/utils/common_err"
"github.com/IceWhaleTech/CasaOS/service"
"github.com/labstack/echo/v4"
)
func PostNotifyMessage(ctx echo.Context) error {
name := ctx.Param("name")
message := make(map[string]interface{}... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v1/samba_test.go | route/v1/samba_test.go | /*
* @Author: LinkLeong link@icewhale.org
* @Date: 2022-08-02 15:10:56
* @LastEditors: LinkLeong
* @LastEditTime: 2022-08-02 16:58:42
* @FilePath: /CasaOS/route/v1/samba_test.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package v1_test
import (... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v2/health.go | route/v2/health.go | package v2
import (
"net/http"
"net/url"
"os"
"path/filepath"
"github.com/IceWhaleTech/CasaOS/codegen"
"github.com/IceWhaleTech/CasaOS/pkg/utils/file"
"github.com/IceWhaleTech/CasaOS/service"
"github.com/labstack/echo/v4"
"github.com/mholt/archiver/v3"
)
func (s *CasaOS) GetHealthServices(ctx echo.Context) ... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v2/file.go | route/v2/file.go | package v2
import (
"net/http"
"strconv"
"github.com/IceWhaleTech/CasaOS/codegen"
"github.com/labstack/echo/v4"
)
// Path: route/v2/file.go
func (s *CasaOS) GetFileTest(ctx echo.Context) error {
//http.ServeFile(w, r, r.URL.Path[1:])
http.ServeFile(ctx.Response().Writer, ctx.Request(), "/DATA/test.img")
re... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v2/zerotier.go | route/v2/zerotier.go | package v2
import (
"fmt"
"net/http"
"github.com/IceWhaleTech/CasaOS-Common/utils"
"github.com/IceWhaleTech/CasaOS/codegen"
"github.com/IceWhaleTech/CasaOS/common"
"github.com/IceWhaleTech/CasaOS/pkg/utils/httper"
"github.com/labstack/echo/v4"
"github.com/tidwall/gjson"
)
func (s *CasaOS) SetZerotierNetworkS... | go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
IceWhaleTech/CasaOS | https://github.com/IceWhaleTech/CasaOS/blob/0d3b2f444ec0193193cf03eef6d43c6e35b0183e/route/v2/route.go | route/v2/route.go | package v2
import (
"github.com/IceWhaleTech/CasaOS/codegen"
"github.com/IceWhaleTech/CasaOS/service"
)
type CasaOS struct {
fileUploadService *service.FileUploadService
}
func NewCasaOS() codegen.ServerInterface {
return &CasaOS{
fileUploadService: service.NewFileUploadService(),
}
}
| go | Apache-2.0 | 0d3b2f444ec0193193cf03eef6d43c6e35b0183e | 2026-01-07T08:36:15.413287Z | false |
go-kit/kit | https://github.com/go-kit/kit/blob/78fbbceece7bbcf073bee814a7772f4397ea756c/util/conn/manager_test.go | util/conn/manager_test.go | package conn
import (
"errors"
"net"
"sync/atomic"
"testing"
"time"
"github.com/go-kit/log"
)
func TestManager(t *testing.T) {
var (
tickc = make(chan time.Time)
after = func(time.Duration) <-chan time.Time { return tickc }
dialconn = &mockConn{}
dialerr = error(nil)
dialer = func(string, s... | go | MIT | 78fbbceece7bbcf073bee814a7772f4397ea756c | 2026-01-07T08:37:16.912292Z | false |
go-kit/kit | https://github.com/go-kit/kit/blob/78fbbceece7bbcf073bee814a7772f4397ea756c/util/conn/doc.go | util/conn/doc.go | // Package conn provides utilities related to connections.
package conn
| go | MIT | 78fbbceece7bbcf073bee814a7772f4397ea756c | 2026-01-07T08:37:16.912292Z | false |
go-kit/kit | https://github.com/go-kit/kit/blob/78fbbceece7bbcf073bee814a7772f4397ea756c/util/conn/manager.go | util/conn/manager.go | package conn
import (
"errors"
"math/rand"
"net"
"time"
"github.com/go-kit/log"
)
// Dialer imitates net.Dial. Dialer is assumed to yield connections that are
// safe for use by multiple concurrent goroutines.
type Dialer func(network, address string) (net.Conn, error)
// AfterFunc imitates time.After.
type Af... | go | MIT | 78fbbceece7bbcf073bee814a7772f4397ea756c | 2026-01-07T08:37:16.912292Z | false |
go-kit/kit | https://github.com/go-kit/kit/blob/78fbbceece7bbcf073bee814a7772f4397ea756c/auth/casbin/middleware.go | auth/casbin/middleware.go | package casbin
import (
"context"
"errors"
stdcasbin "github.com/casbin/casbin/v2"
"github.com/go-kit/kit/endpoint"
)
type contextKey string
const (
// CasbinModelContextKey holds the key to store the access control model
// in context, it can be a path to configuration file or a casbin/model
// Model.
Casb... | go | MIT | 78fbbceece7bbcf073bee814a7772f4397ea756c | 2026-01-07T08:37:16.912292Z | false |
go-kit/kit | https://github.com/go-kit/kit/blob/78fbbceece7bbcf073bee814a7772f4397ea756c/auth/casbin/middleware_test.go | auth/casbin/middleware_test.go | package casbin
import (
"context"
"testing"
stdcasbin "github.com/casbin/casbin/v2"
"github.com/casbin/casbin/v2/model"
fileadapter "github.com/casbin/casbin/v2/persist/file-adapter"
)
func TestStructBaseContext(t *testing.T) {
e := func(ctx context.Context, i interface{}) (interface{}, error) { return ctx, ni... | go | MIT | 78fbbceece7bbcf073bee814a7772f4397ea756c | 2026-01-07T08:37:16.912292Z | false |
go-kit/kit | https://github.com/go-kit/kit/blob/78fbbceece7bbcf073bee814a7772f4397ea756c/auth/basic/middleware.go | auth/basic/middleware.go | package basic
import (
"bytes"
"context"
"crypto/sha256"
"crypto/subtle"
"encoding/base64"
"fmt"
"net/http"
"strings"
"github.com/go-kit/kit/endpoint"
httptransport "github.com/go-kit/kit/transport/http"
)
// AuthError represents an authorization error.
type AuthError struct {
Realm string
}
// StatusCod... | go | MIT | 78fbbceece7bbcf073bee814a7772f4397ea756c | 2026-01-07T08:37:16.912292Z | false |
go-kit/kit | https://github.com/go-kit/kit/blob/78fbbceece7bbcf073bee814a7772f4397ea756c/auth/basic/middleware_test.go | auth/basic/middleware_test.go | package basic
import (
"context"
"encoding/base64"
"fmt"
"testing"
httptransport "github.com/go-kit/kit/transport/http"
)
func TestWithBasicAuth(t *testing.T) {
requiredUser := "test-user"
requiredPassword := "test-pass"
realm := "test realm"
type want struct {
result interface{}
err error
}
tests... | go | MIT | 78fbbceece7bbcf073bee814a7772f4397ea756c | 2026-01-07T08:37:16.912292Z | false |
go-kit/kit | https://github.com/go-kit/kit/blob/78fbbceece7bbcf073bee814a7772f4397ea756c/auth/jwt/middleware.go | auth/jwt/middleware.go | package jwt
import (
"context"
"errors"
"github.com/go-kit/kit/endpoint"
"github.com/golang-jwt/jwt/v4"
)
type contextKey string
const (
// JWTContextKey holds the key used to store a JWT in the context.
JWTContextKey contextKey = "JWTToken"
// JWTTokenContextKey is an alias for JWTContextKey.
//
// Depre... | go | MIT | 78fbbceece7bbcf073bee814a7772f4397ea756c | 2026-01-07T08:37:16.912292Z | false |
go-kit/kit | https://github.com/go-kit/kit/blob/78fbbceece7bbcf073bee814a7772f4397ea756c/auth/jwt/middleware_test.go | auth/jwt/middleware_test.go | package jwt
import (
"context"
"sync"
"testing"
"time"
"crypto/subtle"
"github.com/go-kit/kit/endpoint"
"github.com/golang-jwt/jwt/v4"
)
type customClaims struct {
MyProperty string `json:"my_property"`
jwt.StandardClaims
}
func (c customClaims) VerifyMyProperty(p string) bool {
return subtle.ConstantTim... | go | MIT | 78fbbceece7bbcf073bee814a7772f4397ea756c | 2026-01-07T08:37:16.912292Z | false |
go-kit/kit | https://github.com/go-kit/kit/blob/78fbbceece7bbcf073bee814a7772f4397ea756c/auth/jwt/transport_test.go | auth/jwt/transport_test.go | package jwt
import (
"context"
"fmt"
"net/http"
"testing"
"google.golang.org/grpc/metadata"
)
func TestHTTPToContext(t *testing.T) {
reqFunc := HTTPToContext()
// When the header doesn't exist
ctx := reqFunc(context.Background(), &http.Request{})
if ctx.Value(JWTContextKey) != nil {
t.Error("Context sho... | go | MIT | 78fbbceece7bbcf073bee814a7772f4397ea756c | 2026-01-07T08:37:16.912292Z | false |
go-kit/kit | https://github.com/go-kit/kit/blob/78fbbceece7bbcf073bee814a7772f4397ea756c/auth/jwt/transport.go | auth/jwt/transport.go | package jwt
import (
"context"
"fmt"
stdhttp "net/http"
"strings"
"google.golang.org/grpc/metadata"
"github.com/go-kit/kit/transport/grpc"
"github.com/go-kit/kit/transport/http"
)
const (
bearer string = "bearer"
bearerFormat string = "Bearer %s"
)
// HTTPToContext moves a JWT from request header to... | go | MIT | 78fbbceece7bbcf073bee814a7772f4397ea756c | 2026-01-07T08:37:16.912292Z | false |
go-kit/kit | https://github.com/go-kit/kit/blob/78fbbceece7bbcf073bee814a7772f4397ea756c/sd/instancer.go | sd/instancer.go | package sd
// Event represents a push notification generated from the underlying service discovery
// implementation. It contains either a full set of available resource instances, or
// an error indicating some issue with obtaining information from discovery backend.
// Examples of errors may include loosing connecti... | go | MIT | 78fbbceece7bbcf073bee814a7772f4397ea756c | 2026-01-07T08:37:16.912292Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.