models

package
v0.0.0-...-0fb5c5d Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Secret

type Secret struct {
	SecretBase
	Version int64
}

Secret is a secret database model with persistence version tag

func (*Secret) MarshalBinary

func (m *Secret) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Secret) UnmarshalBinary

func (m *Secret) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Secret) Validate

func (m *Secret) Validate(formats strfmt.Registry) error

Validate validates this secret

type SecretBase

type SecretBase struct {
	CreatedAt      time.Time  `json:"createdAt"`
	ExpiresAt      *time.Time `json:"expiresAt"`
	RemainingViews int32      `json:"remainingViews"`
	SecretText     string     `json:"secretText"`
}

SecretBase is a secret database model

type SecretResponse

type SecretResponse struct {
	XMLName xml.Name `json:"-" xml:"Secret"`

	// The date and time of the creation
	// Format: date-time
	CreatedAt strfmt.DateTime `json:"createdAt,omitempty" xml:"createdAt,omitempty"`

	// The secret cannot be reached after this time
	// Format: date-time
	ExpiresAt *strfmt.DateTime `json:"expiresAt,omitempty" xml:"expiresAt,omitempty"`

	// Unique hash to identify the secrets
	Hash string `json:"hash,omitempty" xml:"hash,omitempty"`

	// How many times the secret can be viewed
	RemainingViews int32 `json:"remainingViews,omitempty" xml:"remainingViews,omitempty"`

	// The secret itself
	SecretText string `json:"secretText,omitempty" xml:"secretText,omitempty"`
}

SecretResponse secret swagger:model Secret

Jump to

Keyboard shortcuts

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