github.com/mundipagg/boleto-api@v0.0.0-20230620145841-3f9ec742599f/models/credentials.go (about) 1 package models 2 3 import ( 4 "go.mongodb.org/mongo-driver/bson/primitive" 5 ) 6 7 //Credentials Credenciais para requisição de Registro de Boleto 8 type Credentials struct { 9 ID primitive.ObjectID `bson:"_id,omitempty"` 10 UserKey string 11 Username string `bson:"username,omitempty"` 12 Password string `bson:"password,omitempty"` 13 } 14 15 //NewCredentials Cria uma instância de Credential 16 func NewCredentials(k, p string) *Credentials { 17 return &Credentials{ 18 UserKey: k, 19 Password: p, 20 } 21 }