...

Source file src/code.rocketnine.space/tslocum/sriracha/extension/renderpost.go

Documentation: code.rocketnine.space/tslocum/sriracha/extension

     1  package extension
     2  
     3  import (
     4  	"io"
     5  	"log"
     6  
     7  	"code.rocketnine.space/tslocum/sriracha"
     8  )
     9  
    10  type renderPost struct {
    11  }
    12  
    13  func RenderPost() *renderPost {
    14  	return &renderPost{}
    15  }
    16  
    17  func (r *renderPost) RenderPost(post *sriracha.Post) ([]byte, error) {
    18  	return []byte("POST " + post.Subject + "-" + post.Message), nil
    19  	return nil, nil
    20  }
    21  
    22  func (r *renderPost) Description() string {
    23  	//TODO implement me
    24  	panic("implement me")
    25  }
    26  
    27  func (r *renderPost) Attach(file io.Reader, size int64, mime string) (*sriracha.Attachment, error) {
    28  	return nil, nil
    29  }
    30  
    31  func (r *renderPost) InsertPost(post *sriracha.Post) error {
    32  	log.Println("ATTACH", post.Subject)
    33  	return nil
    34  }
    35  
    36  func (r *renderPost) DeletePost(post *sriracha.Post) error {
    37  	return nil
    38  }
    39  

View as plain text