MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / UnpackSwapToken

Function UnpackSwapToken

pkg/util/shellutil/tokenswap.go:41–53  ·  view source on GitHub ↗
(token string)

Source from the content-addressed store, hash-verified

39}
40
41func UnpackSwapToken(token string) (*UnpackedTokenType, error) {
42 // base64 decode, then convert from json
43 barr, err := base64.StdEncoding.DecodeString(token)
44 if err != nil {
45 return nil, err
46 }
47 var unpacked UnpackedTokenType
48 err = json.Unmarshal(barr, &unpacked)
49 if err != nil {
50 return nil, err
51 }
52 return &unpacked, nil
53}
54
55func (t *TokenSwapEntry) PackForClient() (string, error) {
56 unpackedToken := &UnpackedTokenType{

Callers 1

setupRpcClientWithTokenFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected