user

package
v0.0.0-...-553ec8c Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type AuthRequest

type AuthRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

Ref: #/components/schemas/AuthRequest

func (*AuthRequest) Decode

func (s *AuthRequest) Decode(d *jx.Decoder) error

Decode decodes AuthRequest from json.

func (*AuthRequest) Encode

func (s *AuthRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AuthRequest) GetEmail

func (s *AuthRequest) GetEmail() string

GetEmail returns the value of Email.

func (*AuthRequest) GetPassword

func (s *AuthRequest) GetPassword() string

GetPassword returns the value of Password.

func (*AuthRequest) MarshalJSON

func (s *AuthRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AuthRequest) SetEmail

func (s *AuthRequest) SetEmail(val string)

SetEmail sets the value of Email.

func (*AuthRequest) SetPassword

func (s *AuthRequest) SetPassword(val string)

SetPassword sets the value of Password.

func (*AuthRequest) UnmarshalJSON

func (s *AuthRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type AuthResponse

type AuthResponse struct {
	AuthToken string `json:"auth_token"`
}

Ref: #/components/schemas/AuthResponse

func (*AuthResponse) Decode

func (s *AuthResponse) Decode(d *jx.Decoder) error

Decode decodes AuthResponse from json.

func (*AuthResponse) Encode

func (s *AuthResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AuthResponse) GetAuthToken

func (s *AuthResponse) GetAuthToken() string

GetAuthToken returns the value of AuthToken.

func (*AuthResponse) MarshalJSON

func (s *AuthResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AuthResponse) SetAuthToken

func (s *AuthResponse) SetAuthToken(val string)

SetAuthToken sets the value of AuthToken.

func (*AuthResponse) UnmarshalJSON

func (s *AuthResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Client

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

Client implements OAS client.

func NewClient

func NewClient(serverURL string, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) GetAuthToken

func (c *Client) GetAuthToken(ctx context.Context, request OptAuthRequest) (GetAuthTokenRes, error)

GetAuthToken invokes GetAuthToken operation.

POST /user/internal/v1/clients/auth

func (*Client) GetClientById

func (c *Client) GetClientById(ctx context.Context, params GetClientByIdParams) (GetClientByIdRes, error)

GetClientById invokes GetClientById operation.

GET /user/internal/v1/clients/{client_id}

func (*Client) GetWalletById

func (c *Client) GetWalletById(ctx context.Context, params GetWalletByIdParams) (GetWalletByIdRes, error)

GetWalletById invokes GetWalletById operation.

GET /user/internal/v1/clients/{client_id}/wallets/{wallet_id}

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type Error

type Error struct {
	// Human-redable error message.
	Message string `json:"message"`
	// Machine-redable error message.
	Code string `json:"code"`
}

Ref: #/components/schemas/Error

func (*Error) Decode

func (s *Error) Decode(d *jx.Decoder) error

Decode decodes Error from json.

func (*Error) Encode

func (s *Error) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Error) GetCode

func (s *Error) GetCode() string

GetCode returns the value of Code.

func (*Error) GetMessage

func (s *Error) GetMessage() string

GetMessage returns the value of Message.

func (*Error) MarshalJSON

func (s *Error) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Error) SetCode

func (s *Error) SetCode(val string)

SetCode sets the value of Code.

func (*Error) SetMessage

func (s *Error) SetMessage(val string)

SetMessage sets the value of Message.

func (*Error) UnmarshalJSON

func (s *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type GetAuthTokenBadRequest

type GetAuthTokenBadRequest Error

func (*GetAuthTokenBadRequest) Decode

func (s *GetAuthTokenBadRequest) Decode(d *jx.Decoder) error

Decode decodes GetAuthTokenBadRequest from json.

func (*GetAuthTokenBadRequest) Encode

func (s *GetAuthTokenBadRequest) Encode(e *jx.Encoder)

Encode encodes GetAuthTokenBadRequest as json.

func (*GetAuthTokenBadRequest) MarshalJSON

func (s *GetAuthTokenBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetAuthTokenBadRequest) UnmarshalJSON

func (s *GetAuthTokenBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetAuthTokenForbidden

type GetAuthTokenForbidden Error

func (*GetAuthTokenForbidden) Decode

func (s *GetAuthTokenForbidden) Decode(d *jx.Decoder) error

Decode decodes GetAuthTokenForbidden from json.

func (*GetAuthTokenForbidden) Encode

func (s *GetAuthTokenForbidden) Encode(e *jx.Encoder)

Encode encodes GetAuthTokenForbidden as json.

func (*GetAuthTokenForbidden) MarshalJSON

func (s *GetAuthTokenForbidden) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetAuthTokenForbidden) UnmarshalJSON

func (s *GetAuthTokenForbidden) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetAuthTokenInternalServerError

type GetAuthTokenInternalServerError Error

func (*GetAuthTokenInternalServerError) Decode

Decode decodes GetAuthTokenInternalServerError from json.

func (*GetAuthTokenInternalServerError) Encode

Encode encodes GetAuthTokenInternalServerError as json.

func (*GetAuthTokenInternalServerError) MarshalJSON

func (s *GetAuthTokenInternalServerError) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetAuthTokenInternalServerError) UnmarshalJSON

func (s *GetAuthTokenInternalServerError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetAuthTokenNotFound

type GetAuthTokenNotFound Error

func (*GetAuthTokenNotFound) Decode

func (s *GetAuthTokenNotFound) Decode(d *jx.Decoder) error

Decode decodes GetAuthTokenNotFound from json.

func (*GetAuthTokenNotFound) Encode

func (s *GetAuthTokenNotFound) Encode(e *jx.Encoder)

Encode encodes GetAuthTokenNotFound as json.

func (*GetAuthTokenNotFound) MarshalJSON

func (s *GetAuthTokenNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetAuthTokenNotFound) UnmarshalJSON

func (s *GetAuthTokenNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetAuthTokenRes

type GetAuthTokenRes interface {
	// contains filtered or unexported methods
}

type GetClientByIdBadRequest

type GetClientByIdBadRequest Error

func (*GetClientByIdBadRequest) Decode

func (s *GetClientByIdBadRequest) Decode(d *jx.Decoder) error

Decode decodes GetClientByIdBadRequest from json.

func (*GetClientByIdBadRequest) Encode

func (s *GetClientByIdBadRequest) Encode(e *jx.Encoder)

Encode encodes GetClientByIdBadRequest as json.

func (*GetClientByIdBadRequest) MarshalJSON

func (s *GetClientByIdBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetClientByIdBadRequest) UnmarshalJSON

func (s *GetClientByIdBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetClientByIdInternalServerError

type GetClientByIdInternalServerError Error

func (*GetClientByIdInternalServerError) Decode

Decode decodes GetClientByIdInternalServerError from json.

func (*GetClientByIdInternalServerError) Encode

Encode encodes GetClientByIdInternalServerError as json.

func (*GetClientByIdInternalServerError) MarshalJSON

func (s *GetClientByIdInternalServerError) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetClientByIdInternalServerError) UnmarshalJSON

func (s *GetClientByIdInternalServerError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetClientByIdNotFound

type GetClientByIdNotFound Error

func (*GetClientByIdNotFound) Decode

func (s *GetClientByIdNotFound) Decode(d *jx.Decoder) error

Decode decodes GetClientByIdNotFound from json.

func (*GetClientByIdNotFound) Encode

func (s *GetClientByIdNotFound) Encode(e *jx.Encoder)

Encode encodes GetClientByIdNotFound as json.

func (*GetClientByIdNotFound) MarshalJSON

func (s *GetClientByIdNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetClientByIdNotFound) UnmarshalJSON

func (s *GetClientByIdNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetClientByIdParams

type GetClientByIdParams struct {
	// Идентификатор.
	ClientID string
}

GetClientByIdParams is parameters of GetClientById operation.

type GetClientByIdRes

type GetClientByIdRes interface {
	// contains filtered or unexported methods
}

type GetWalletByIdBadRequest

type GetWalletByIdBadRequest Error

func (*GetWalletByIdBadRequest) Decode

func (s *GetWalletByIdBadRequest) Decode(d *jx.Decoder) error

Decode decodes GetWalletByIdBadRequest from json.

func (*GetWalletByIdBadRequest) Encode

func (s *GetWalletByIdBadRequest) Encode(e *jx.Encoder)

Encode encodes GetWalletByIdBadRequest as json.

func (*GetWalletByIdBadRequest) MarshalJSON

func (s *GetWalletByIdBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetWalletByIdBadRequest) UnmarshalJSON

func (s *GetWalletByIdBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetWalletByIdInternalServerError

type GetWalletByIdInternalServerError Error

func (*GetWalletByIdInternalServerError) Decode

Decode decodes GetWalletByIdInternalServerError from json.

func (*GetWalletByIdInternalServerError) Encode

Encode encodes GetWalletByIdInternalServerError as json.

func (*GetWalletByIdInternalServerError) MarshalJSON

func (s *GetWalletByIdInternalServerError) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetWalletByIdInternalServerError) UnmarshalJSON

func (s *GetWalletByIdInternalServerError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetWalletByIdNotFound

type GetWalletByIdNotFound Error

func (*GetWalletByIdNotFound) Decode

func (s *GetWalletByIdNotFound) Decode(d *jx.Decoder) error

Decode decodes GetWalletByIdNotFound from json.

func (*GetWalletByIdNotFound) Encode

func (s *GetWalletByIdNotFound) Encode(e *jx.Encoder)

Encode encodes GetWalletByIdNotFound as json.

func (*GetWalletByIdNotFound) MarshalJSON

func (s *GetWalletByIdNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetWalletByIdNotFound) UnmarshalJSON

func (s *GetWalletByIdNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetWalletByIdParams

type GetWalletByIdParams struct {
	// Идентификатор пользователя.
	ClientID string
	// Идентификатор кошелька.
	WalletID string
}

GetWalletByIdParams is parameters of GetWalletById operation.

type GetWalletByIdRes

type GetWalletByIdRes interface {
	// contains filtered or unexported methods
}

type Handler

type Handler interface {
	// GetAuthToken implements GetAuthToken operation.
	//
	// POST /user/internal/v1/clients/auth
	GetAuthToken(ctx context.Context, req OptAuthRequest) (GetAuthTokenRes, error)
	// GetClientById implements GetClientById operation.
	//
	// GET /user/internal/v1/clients/{client_id}
	GetClientById(ctx context.Context, params GetClientByIdParams) (GetClientByIdRes, error)
	// GetWalletById implements GetWalletById operation.
	//
	// GET /user/internal/v1/clients/{client_id}/wallets/{wallet_id}
	GetWalletById(ctx context.Context, params GetWalletByIdParams) (GetWalletByIdRes, error)
}

Handler handles operations described by OpenAPI v3 specification.

type Invoker

type Invoker interface {
	// GetAuthToken invokes GetAuthToken operation.
	//
	// POST /user/internal/v1/clients/auth
	GetAuthToken(ctx context.Context, request OptAuthRequest) (GetAuthTokenRes, error)
	// GetClientById invokes GetClientById operation.
	//
	// GET /user/internal/v1/clients/{client_id}
	GetClientById(ctx context.Context, params GetClientByIdParams) (GetClientByIdRes, error)
	// GetWalletById invokes GetWalletById operation.
	//
	// GET /user/internal/v1/clients/{client_id}/wallets/{wallet_id}
	GetWalletById(ctx context.Context, params GetWalletByIdParams) (GetWalletByIdRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type Labeler

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

Labeler is used to allow adding custom attributes to the server request metrics.

func LabelerFromContext

func LabelerFromContext(ctx context.Context) (*Labeler, bool)

LabelerFromContext retrieves the Labeler from the provided context, if present.

If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.

func (*Labeler) Add

func (l *Labeler) Add(attrs ...attribute.KeyValue)

Add attributes to the Labeler.

func (*Labeler) AttributeSet

func (l *Labeler) AttributeSet() attribute.Set

AttributeSet returns the attributes added to the Labeler as an attribute.Set.

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OptAuthRequest

type OptAuthRequest struct {
	Value AuthRequest
	Set   bool
}

OptAuthRequest is optional AuthRequest.

func NewOptAuthRequest

func NewOptAuthRequest(v AuthRequest) OptAuthRequest

NewOptAuthRequest returns new OptAuthRequest with value set to v.

func (*OptAuthRequest) Decode

func (o *OptAuthRequest) Decode(d *jx.Decoder) error

Decode decodes AuthRequest from json.

func (OptAuthRequest) Encode

func (o OptAuthRequest) Encode(e *jx.Encoder)

Encode encodes AuthRequest as json.

func (OptAuthRequest) Get

func (o OptAuthRequest) Get() (v AuthRequest, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptAuthRequest) IsSet

func (o OptAuthRequest) IsSet() bool

IsSet returns true if OptAuthRequest was set.

func (OptAuthRequest) MarshalJSON

func (s OptAuthRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptAuthRequest) Or

Or returns value if set, or given parameter if does not.

func (*OptAuthRequest) Reset

func (o *OptAuthRequest) Reset()

Reset unsets value.

func (*OptAuthRequest) SetTo

func (o *OptAuthRequest) SetTo(v AuthRequest)

SetTo sets value to v.

func (*OptAuthRequest) UnmarshalJSON

func (s *OptAuthRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type Route

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

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type Server

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

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) GetAuthToken

GetAuthToken implements GetAuthToken operation.

POST /user/internal/v1/clients/auth

func (UnimplementedHandler) GetClientById

GetClientById implements GetClientById operation.

GET /user/internal/v1/clients/{client_id}

func (UnimplementedHandler) GetWalletById

GetWalletById implements GetWalletById operation.

GET /user/internal/v1/clients/{client_id}/wallets/{wallet_id}

type User

type User struct {
	ClientID  uuid.UUID `json:"client_id"`
	FirstName OptString `json:"first_name"`
	LastName  OptString `json:"last_name"`
	Email     string    `json:"email"`
	Wallets   []string  `json:"wallets"`
}

Ref: #/components/schemas/User

func (*User) Decode

func (s *User) Decode(d *jx.Decoder) error

Decode decodes User from json.

func (*User) Encode

func (s *User) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*User) GetClientID

func (s *User) GetClientID() uuid.UUID

GetClientID returns the value of ClientID.

func (*User) GetEmail

func (s *User) GetEmail() string

GetEmail returns the value of Email.

func (*User) GetFirstName

func (s *User) GetFirstName() OptString

GetFirstName returns the value of FirstName.

func (*User) GetLastName

func (s *User) GetLastName() OptString

GetLastName returns the value of LastName.

func (*User) GetWallets

func (s *User) GetWallets() []string

GetWallets returns the value of Wallets.

func (*User) MarshalJSON

func (s *User) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*User) SetClientID

func (s *User) SetClientID(val uuid.UUID)

SetClientID sets the value of ClientID.

func (*User) SetEmail

func (s *User) SetEmail(val string)

SetEmail sets the value of Email.

func (*User) SetFirstName

func (s *User) SetFirstName(val OptString)

SetFirstName sets the value of FirstName.

func (*User) SetLastName

func (s *User) SetLastName(val OptString)

SetLastName sets the value of LastName.

func (*User) SetWallets

func (s *User) SetWallets(val []string)

SetWallets sets the value of Wallets.

func (*User) UnmarshalJSON

func (s *User) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*User) Validate

func (s *User) Validate() error

type Wallet

type Wallet struct {
	PublicKey  string `json:"public_key"`
	PrivateKey string `json:"private_key"`
}

Ref: #/components/schemas/Wallet

func (*Wallet) Decode

func (s *Wallet) Decode(d *jx.Decoder) error

Decode decodes Wallet from json.

func (*Wallet) Encode

func (s *Wallet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Wallet) GetPrivateKey

func (s *Wallet) GetPrivateKey() string

GetPrivateKey returns the value of PrivateKey.

func (*Wallet) GetPublicKey

func (s *Wallet) GetPublicKey() string

GetPublicKey returns the value of PublicKey.

func (*Wallet) MarshalJSON

func (s *Wallet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Wallet) SetPrivateKey

func (s *Wallet) SetPrivateKey(val string)

SetPrivateKey sets the value of PrivateKey.

func (*Wallet) SetPublicKey

func (s *Wallet) SetPublicKey(val string)

SetPublicKey sets the value of PublicKey.

func (*Wallet) UnmarshalJSON

func (s *Wallet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

Jump to

Keyboard shortcuts

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