common

package
v0.0.0-...-0a9b7e3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateKey

func ValidateKey(ctx context.Context, db *database.Database, trackId string, key string) error

そのTrackIDのアクセス権があるかを調べます

Types

type UserAgent

type UserAgent struct {
	Name      string `json:"name"`
	Version   string `json:"version"`
	OS        string `json:"os"`
	OSVersion string `json:"os_version"`
	Device    string `json:"device"`
	Mobile    bool   `json:"mobile"`
	Tablet    bool   `json:"access_id"`
	Desktop   bool   `json:"desktop"`
	Bot       bool   `json:"bot"`
	URL       string `json:"url"`
	String    string `json:"string"`
}

func NewUserAgent

func NewUserAgent(target string) *UserAgent

func ParseUserAgentJson

func ParseUserAgentJson(target []byte) (*UserAgent, error)

UserAgentToJsonのjsonを構造体に戻します

func (*UserAgent) ToJson

func (c *UserAgent) ToJson() ([]byte, error)

userAgentを解析し、json形式で返します

Jump to

Keyboard shortcuts

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