Documentation ¶
Index ¶
- Constants
- Variables
- func CreateCFClient() *cloudfront.Client
- func CreateClient() *dynamodb.Client
- func CreateLocalClient() *dynamodb.Client
- func CreateProdClient() *dynamodb.Client
- func CreateTable(d *dynamodb.Client) error
- func CreateTableIfNotExists(d *dynamodb.Client) error
- func InvalidateCommentCache(cf *cloudfront.Client, path string) error
- func ListComments(d *dynamodb.Client, url string) (*[]Comment, error)
- type Comment
- type CreateCommentInput
Constants ¶
View Source
const TABLE_NAME = "Comments"
Variables ¶
View Source
var DISTRIBUTION_ID string
Functions ¶
func CreateCFClient ¶
func CreateCFClient() *cloudfront.Client
func CreateClient ¶
func CreateLocalClient ¶
func CreateProdClient ¶
func CreateTable ¶
func CreateTableIfNotExists ¶
func InvalidateCommentCache ¶
func InvalidateCommentCache(cf *cloudfront.Client, path string) error
Types ¶
type Comment ¶
type Comment struct { ID uuid.UUIDv7 `dynamodbav:"id" json:"id"` Email string `dynamodbav:"email" json:"-"` Body string `dynamodbav:"body" json:"body"` Signature string `dynamodbav:"signature" json:"signature"` Url string `dynamodbav:"url" json:"url"` Website *string `dynamodbav:"website" json:"website"` InsertedAt int64 `dynamodbav:"insertedAt" json:"insertedAt"` }
func CreateComment ¶
func CreateComment(d *dynamodb.Client, input *CreateCommentInput) (*Comment, error)
func (Comment) MarshalJSON ¶
type CreateCommentInput ¶
type CreateCommentInput struct { Body string `json:"body"` Signature string `json:"signature"` Url string `json:"url"` Website *string `json:"website"` Email string `json:"email"` IAmARobot bool `json:"iAmARobot"` }
func (*CreateCommentInput) Validate ¶
func (p *CreateCommentInput) Validate() []string
Click to show internal directories.
Click to hide internal directories.