bitbucket.org/Aishee/synsec@v0.0.0-20210414005726-236fc01a153d/pkg/models/watcher_auth_response.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package models
     4  
     5  // This file was generated by the swagger tool.
     6  // Editing this file might prove futile when you re-run the swagger generate command
     7  
     8  import (
     9  	"github.com/go-openapi/strfmt"
    10  	"github.com/go-openapi/swag"
    11  )
    12  
    13  // WatcherAuthResponse WatcherAuthResponse
    14  //
    15  // the response of a successful authentication
    16  //
    17  // swagger:model WatcherAuthResponse
    18  type WatcherAuthResponse struct {
    19  
    20  	// code
    21  	Code int64 `json:"code,omitempty"`
    22  
    23  	// expire
    24  	Expire string `json:"expire,omitempty"`
    25  
    26  	// token
    27  	Token string `json:"token,omitempty"`
    28  }
    29  
    30  // Validate validates this watcher auth response
    31  func (m *WatcherAuthResponse) Validate(formats strfmt.Registry) error {
    32  	return nil
    33  }
    34  
    35  // MarshalBinary interface implementation
    36  func (m *WatcherAuthResponse) MarshalBinary() ([]byte, error) {
    37  	if m == nil {
    38  		return nil, nil
    39  	}
    40  	return swag.WriteJSON(m)
    41  }
    42  
    43  // UnmarshalBinary interface implementation
    44  func (m *WatcherAuthResponse) UnmarshalBinary(b []byte) error {
    45  	var res WatcherAuthResponse
    46  	if err := swag.ReadJSON(b, &res); err != nil {
    47  		return err
    48  	}
    49  	*m = res
    50  	return nil
    51  }