MCPcopy Create free account
hub / github.com/Atsika/aznet / CreateBootstrapTokens

Method CreateBootstrapTokens

aztable.go:178–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176 return strings.TrimPrefix(sasToken, "?"), nil
177}
178
179func (p *tableDriver) CreateBootstrapTokens() (string, string, error) {
180 if p.ep.Account == "" || p.ep.Key == "" {
181 return "", "", ErrSASGenerationFailed
182 }
183 hSAS, err := p.makeSAS(p.cfg.handshakeEndpoint, aztables.SASPermissions{Add: true})
184 if err != nil {
185 return "", "", fmt.Errorf("%w: %v", ErrSASGenerationFailed, err)
186 }
187 tSAS, err := p.makeSAS(p.cfg.tokenEndpoint, aztables.SASPermissions{Read: true})
188 if err != nil {
189 return "", "", fmt.Errorf("%w: %v", ErrSASGenerationFailed, err)
190 }
191 return hSAS, tSAS, nil
192}
193
194func (p *tableDriver) CreateSession(ctx context.Context, connID string) (SessionTokens, error) {

Callers

nothing calls this directly

Calls 1

makeSASMethod · 0.95

Tested by

no test coverage detected