config

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORSAllowOrigin

func CORSAllowOrigin() string

CORSAllowOrigin はCORSのAllow Originを取得します。

func DSN

func DSN() string

DSN はデータベースにアクセスするためのData Source Nameを返します。

func FrontendURL

func FrontendURL() string

FrontendURL はフロントエンドサーバのURLを取得します。

func IsDev

func IsDev() bool

IsDev はDev環境がどうか返します。

func IsLocal

func IsLocal() bool

IsLocal はローカル環境がどうか返します。

func IsReliableOrigin added in v1.4.0

func IsReliableOrigin(url string) bool

IsReliableOrigin は受け取ったURLが信頼できるURLか確認します。

func Port

func Port() string

Port はサーバのポート番号を取得します。

Types

type Spotify

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

Spotify はSpotifyに関連する設定を表します。

func NewSpotify

func NewSpotify() *Spotify

NewSpotify はSpotifyに関連する設定を環境変数から取得してSpotify構造体を返します、

func (Spotify) ClientID

func (s Spotify) ClientID() string

ClientID はSpotify Web APIのClient IDを取得します。

func (Spotify) ClientSecret

func (s Spotify) ClientSecret() string

ClientSecret はSpotify Web APIのClient Secretを取得します。

func (Spotify) RedirectURL

func (s Spotify) RedirectURL() string

RedirectURL はSpotify Web APIのRedirect URLを取得します。

Jump to

Keyboard shortcuts

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