Documentation
¶
Index ¶
- func ConvertIDFromAddress(prefName string) int
- func ConvertIDIntoInt64(ID interface{}) (int64, error)
- func CopyStruct(src interface{}, dst interface{}) error
- func CreateLinkHeader(reqData *goa.RequestData, scheme string, cursor string) linkheader.Link
- func CreateTokenHash(str string) string
- func DelimiterByCharCon(delimiter string, strs ...string) string
- func FetchAPIresponse(client *http.Client, url string, dest interface{}) error
- func FormatAddress(address string) string
- func GenHashFromString(str string) string
- func GetAreaFromAddress(address string) string
- func GetUserKey(ctx context.Context) (*datastore.Key, error)
- func ReadFileFromBucket(ctx context.Context, path string) ([]byte, error)
- func RemoveDuplicateInt64(args []int64) []int64
- func RemovePoscode(str string) string
- func RemoveSpace(str string) string
- func SetUserKey(parents context.Context, userKey *datastore.Key) context.Context
- type ContextKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertIDFromAddress ¶
ConvertIDFromAddress 文字列から都道府県判別する
func ConvertIDIntoInt64 ¶
ConvertIDIntoInt64 文字列をint64に変換する
func CopyStruct ¶
func CopyStruct(src interface{}, dst interface{}) error
CopyStruct 構造体をコピーする。変数名と型で判定している。
func CreateLinkHeader ¶
func CreateLinkHeader(reqData *goa.RequestData, scheme string, cursor string) linkheader.Link
CreateLinkHeader レスポンスヘッダのLinkに付加するページングリンク情報を作成する
func CreateTokenHash ¶
CreateTokenHash 渡された文字列とsaltからTokenハッシュを生成する
func DelimiterByCharCon ¶
DelimiterByCharCon 指定区切り文字でも字を連結する
func FetchAPIresponse ¶
FetchAPIresponse 外部APIのレスポンス(json)をdestに入れる
func FormatAddress ¶
FormatAddress 住所情報の整形をする さらに情報が増えたら配列で引数を取る
func GetAreaFromAddress ¶
GetAreaFromAddress 住所から市区町村までを取得する
func GetUserKey ¶
GetUserKey Contextに入っているUserKeyを取り出す
func ReadFileFromBucket ¶
ReadFileFromBucket GCP上のStorageにアクセスしてデータも返す
Types ¶
type ContextKey ¶
type ContextKey string
ContextKey Contextのキーを扱うためのstring
const (
ContextUserKey ContextKey = "userKey"
)
Context内の値にアクセスするための定数キー
Click to show internal directories.
Click to hide internal directories.