sls

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SLSDefaultEndpoint = "log.aliyuncs.com"
	SLSAPIVersion      = "0.6.0"
	Version            = "0.0.1"
)
View Source
const HeaderSLSPrefix1 = "x-log-"
View Source
const HeaderSLSPrefix2 = "x-acs-"

Variables

View Source
var DefaultUserAgent = fmt.Sprintf("AlibabaCloud (%s; %s) Golang/%s Core/%s", runtime.GOOS, runtime.GOARCH, strings.Trim(runtime.Version(), "go"), Version)

Functions

func CreateSignature

func CreateSignature(stringToSignature, accessKeySecret string) string

CreateSignature creates signature for string following Aliyun rules

func GetGMTime

func GetGMTime() string

func IsAccessDenied added in v0.2.5

func IsAccessDenied(err error) bool

Types

type Client

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

func NewClient

func NewClient(internal bool, region, accessKeyId, accessKeySecret, securityToken string) *Client

func (*Client) ListProjects added in v0.1.6

func (client *Client) ListProjects(r ListProjectRequest) (*ListProjectResponse, error)

type Driver

type Driver struct {
	Cred   aliauth.Credential
	Region string
	// contains filtered or unexported fields
}

func (*Driver) ListProjects

func (d *Driver) ListProjects(ctx context.Context) ([]schema.Log, error)

func (*Driver) PartialError added in v0.2.4

func (d *Driver) PartialError() error

func (*Driver) SetHTTPClient added in v0.2.3

func (d *Driver) SetHTTPClient(client *http.Client)

type Error

type Error struct {
	StatusCode int
	Code       string `json:"errorCode,omitempty"`
	Message    string `json:"errorMessage,omitempty"`
}

func (*Error) Error

func (err *Error) Error() string

type ListProjectRequest

type ListProjectRequest struct {
	Offset      int32  `json:"offset,omitempty" xml:"offset,omitempty"`
	ProjectName string `json:"projectName,omitempty" xml:"projectName,omitempty"`
	Size        int32  `json:"size,omitempty" xml:"size,omitempty"`
}

func (ListProjectRequest) Map

func (r ListProjectRequest) Map() map[string]string

type ListProjectResponse

type ListProjectResponse struct {
	Count    *int64     `json:"count,omitempty" xml:"count,omitempty"`
	Projects []*Project `json:"projects,omitempty" xml:"projects,omitempty" type:"Repeated"`
	Total    *int64     `json:"total,omitempty" xml:"total,omitempty"`
}

type Project

type Project struct {
	CreateTime      *string `json:"createTime,omitempty" xml:"createTime,omitempty"`
	Description     *string `json:"description,omitempty" xml:"description,omitempty"`
	LastModifyTime  *string `json:"lastModifyTime,omitempty" xml:"lastModifyTime,omitempty"`
	Owner           *string `json:"owner,omitempty" xml:"owner,omitempty"`
	ProjectName     *string `json:"projectName,omitempty" xml:"projectName,omitempty"`
	Region          *string `json:"region,omitempty" xml:"region,omitempty"`
	ResourceGroupId *string `json:"resourceGroupId,omitempty" xml:"resourceGroupId,omitempty"`
	Status          *string `json:"status,omitempty" xml:"status,omitempty"`
}

Jump to

Keyboard shortcuts

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